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

Tabs: Improved accessibility #23

Merged
merged 1 commit into from
Nov 11, 2021
Merged

Conversation

omaxel
Copy link
Collaborator

@omaxel omaxel commented Nov 6, 2021

#22

I have aligned the tabs implementation to the one specified in this (MDN) and this (WAI-ARIA) pages.

We need JavaScript to be totally compliant, but I think we have good results here. I have tested the component using ChromeVox and NVDA screen reader and I got the expected results.

Inspecting the page with the Accessibility feature of Chrome DevTools, the elements are presented as expected.

Also, using the axe DevTools I executed a scan and I got just one warning with low user impact. You can find more details here. It's complaining about using role=tab on a radio element. We don't have any choice without using JavaScript since we don't have "memory" in CSS. That's the same reason for which I didn't use the button element to open a tab as suggested by the documentation.

@netlify
Copy link

netlify bot commented Nov 6, 2021

✔️ Deploy Preview for css-ui ready!

🔨 Explore the source changes: 209f7fc

🔍 Inspect the deploy log: https://app.netlify.com/sites/css-ui/deploys/6186c8260553080008b4e2ed

😎 Browse the preview: https://deploy-preview-23--css-ui.netlify.app

@omaxel omaxel changed the title Improved tabs accessibility Tabs: Improved accessibility Nov 6, 2021
@zetareticoli zetareticoli added the enhancement New feature or request label Nov 8, 2021
@zetareticoli zetareticoli added this to the Accessibility milestone Nov 8, 2021
@zetareticoli
Copy link
Owner

It seems like a big step forward. Thank you again, great job. Really appreciated your attention to details.

As for the accordion, do you think there's something we could specify in the documentation about accessibility?

👍

@zetareticoli zetareticoli merged commit 47b0e7b into dev Nov 11, 2021
zetareticoli added a commit that referenced this pull request Nov 11, 2021
* Fix: Accordion focus on closed panel child element (#14)

* Fix: Accordion focus on closed tab child element

* Updated accordion documentation

* Added generated file

Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>

* Feature/#10 modal focus trap (#17)

* Added role and aria-modal attributes, adde x icon to close #10

* Added aria-labelledby #10

* Added tabindex to close button #10

* Added more documentation about Focus Trap and Page Scroll #10

* Change modal template #10

* Changed blockquote style #10

* Better doc #10

* Fixed aria-labelledby attribute #10

* Changed styel

* Feature/#7 components docs (#18)

* Added more content to Tabs doc #7

* Changed lead color #7

* Added support for :focus event on tooltips #7

* Changed Tooltips docs #7

* Show ring on focused tab panel's label (#20)

Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>

* Removed container parent maintaining accessibility (#24)

Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>

* Added focus ring on focused accordion item's label (#25)

Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>

* Improved tabs accessibility (#23)

Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>

* Removed accordion container from HTML preview #24

* Added information to CHANGELOG

* Added upcoming release info

* Added accessibility info for tabs

* Bumped lib version for npm package

* Fixed tabs accessibility doc

Co-authored-by: Omar Muscatello <7016897+omaxel@users.noreply.github.com>
Co-authored-by: Omar Muscatello <7016897+OmarMuscatello@users.noreply.github.com>
@zetareticoli zetareticoli deleted the feature/#22-tabs-accessibility branch December 9, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants