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

Accordion: Added focus ring on focused accordion item's label #25

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

omaxel
Copy link
Collaborator

@omaxel omaxel commented Nov 6, 2021

#9

When one of the accordion items obtain the focus, the user can navigate between accordion items by using the tab key. Now, a focus ring is shown around the label. Note that the focus ring is not shown when clicking on the label. I used the same technique already applied in the tabs component (see this PR).

Also, when the mouse pointer is over an expanded accordion-item label, the user receives feedback by showing a darker gray compared to the "expanded" state.

@netlify
Copy link

netlify bot commented Nov 6, 2021

✔️ Deploy Preview for css-ui ready!

🔨 Explore the source changes: bdeabf8

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

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

@zetareticoli
Copy link
Owner

zetareticoli commented Nov 8, 2021

It works great!

We probably should add an Accessibility chapter in the component's documentation, showing how it works (could be a screen). Just to make the obvious clear. 🙂

What do you think?

@zetareticoli zetareticoli merged commit 3fd11b7 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/#9-accordion-focus-feedback 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants