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

Remove aria attributes and role from all slots #1422

Closed
6 tasks done
claviska opened this issue Jul 3, 2023 · 1 comment · Fixed by #1444
Closed
6 tasks done

Remove aria attributes and role from all slots #1422

claviska opened this issue Jul 3, 2023 · 1 comment · Fixed by #1444
Assignees
Labels
a11y Anything relating to accessibility.

Comments

@claviska
Copy link
Member

claviska commented Jul 3, 2023

Slots with aria and/or role attributes are invalid:

They cause problems in assistive devices and they cause Lighthouse's accessibility checker to error out.

What we need to do

  • Add a lint rule to prevent regressions and future incidents. Since this isn't specific to Shoelace, it's best to do this upstream in the eslint-plugin-lit-a11y plugin. Much of the work has already been done upstream, but we need to contribute:
    • Additional logic to check for <slot role="">
    • Add documentation (see TODOs)
    • Add test cases (see TODOs)
  • When open-wc releases it, update the eslint-plugin-lit-a11y plugin in Shoelace
  • Remove all aria attributes from slots in the Shoelace codebase

Special thanks to @thepassle for scaffolding out the PR to make this possible!

@claviska claviska added a11y Anything relating to accessibility. upstream An upstream issue is blocking the issue. labels Jul 3, 2023
@claviska
Copy link
Member Author

I've made the PR upstream and it was released today. I have a local branch in progress handling this. We have some failing lint rules that I'm still working out.

@claviska claviska removed the upstream An upstream issue is blocking the issue. label Jul 11, 2023
claviska added a commit that referenced this issue Jul 12, 2023
* update eslint-plugin-lit-a11y to latest

* update eslint deps

* remove aria- and role attribs from slots; closes #1422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Anything relating to accessibility.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants