Skip to content

Testing: Add lint rule to forbid <a title> #20198

@aduth

Description

@aduth

Related: #19990, #19735

Based on the following resources, it is my understanding that we should never want to include a title attribute on a link.

Much like how we already use eslint-plugin-jsx-a11y for linting various accessibility issues in JSX usage, we should be able to forbid the use of this attribute on links.

Implementation Notes:

It is unclear if this might be best implemented as:

Important note: title attributes can be expected (encouraged even) for some non-link elements, so the rule should be made specific to links.

Recommendation: An upstream patch could serve as useful validation of the idea. Even if rejected and still desirable for our own project, the implementation could be reused for a custom rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer efforts[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions