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

feat(a11y): add no-redundant-roles rule (#820) #5361

Closed
wants to merge 1 commit into from
Closed

feat(a11y): add no-redundant-roles rule (#820) #5361

wants to merge 1 commit into from

Conversation

mcmxcdev
Copy link
Contributor

@mcmxcdev mcmxcdev commented Sep 6, 2020

Implements a rough version of no-redundant-roles lint rule from #820.

I went through all HTML tags listed on https://www.w3.org/TR/html-aria/#docconformance and made sure to be able to lint easy cases for redundant roles like e.g. on a <button> element.

I skipped the difficult implementation parts for now, e.g. for the <header> element, which would need to be aware of its parent node or if that parent node has a potentially assigned role.

The HTML tags that would require a more complex implementation logic are commented out for now in the implicitAriaSemantics Map.

It is up to the core team to decide if this lint rule should become more complex and therefore time-consuming for maintaining it with potential bugs or not.

- flagging easy cases of redundant aria roles on html tags for now

Signed-off-by: mhatvan <markus_hatvan@aon.at>
@stale
Copy link

stale bot commented Jun 26, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 27, 2021
@mcmxcdev
Copy link
Contributor Author

@pngwn This PR is now more than a year old, is there a chance to get this reviewed/approved?

@dummdidumm dummdidumm mentioned this pull request Dec 31, 2021
5 tasks
jamesb93 pushed a commit to jamesb93/svelte that referenced this pull request Dec 31, 2021
@dummdidumm dummdidumm closed this in 84a4ef0 Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants