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

Add button-icon-a11ytitle rule #31

Merged
merged 1 commit into from
Dec 22, 2021
Merged

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Dec 21, 2021

What does this PR do?

Adds rule to ensure that icon-only buttons have an a11yTitle or aria-label so that the action of the button is clear to those who use assistive technologies.

Where should the reviewer start?

lib/rules/button-icon-a11ytitle.js

Can you provide a link to an AST Explorer example that validates the rule works as expected?

https://astexplorer.net/#/gist/095a0e22eac6270a717b67752003a763/dcd2b93a8c03ca618ea4356784c08218f58e15b2

Any background context you want to provide?

What are the relevant issues?

Closes #14

Screenshots (if appropriate)

Tested local in design system site

Screen Shot 2021-12-21 at 3 18 09 PM

Have docs been added/updated?

Yes.

Should this PR be mentioned in the release notes?

Yes. Added button-icon-a11ytitle.

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

@ericsoderberghp ericsoderberghp merged commit 66cd44b into master Dec 22, 2021
@ericsoderberghp ericsoderberghp deleted the button-icon-a11yTitle branch December 22, 2021 18:41
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.

Button w/o label (i.e. icon only button) should have a11yTitle
2 participants