Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aduth opened this issue Feb 12, 2020 · 0 comments
Open

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

aduth opened this issue Feb 12, 2020 · 0 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@aduth
Copy link
Member

aduth commented Feb 12, 2020

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.

@aduth aduth added [Type] Task Issues or PRs that have been broken down into an individual action to take [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Feb 12, 2020
@adamwoodnz adamwoodnz added the Needs Dev Ready for, and needs developer efforts label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

2 participants