accede-web / accordion Goto Github PK
View Code? Open in Web Editor NEWWAI-ARIA accordion plugin based on AcceDe Web accessibility guidelines
License: ISC License
WAI-ARIA accordion plugin based on AcceDe Web accessibility guidelines
License: ISC License
Hi there, thank you for this very promising library! We are using it in an upcoming project.
I have a specific use case and I'm wondering if this library is a good fit for it:
I have this button:
that takes focus from keyboard:
When I click it (or press Return/Space), I want to "replace" it visually with the following buttons:
(initially the focus is kept on the original button)
then when I press Tab the first item in the content gets the focus:
I managed to implement this with:
button[aria-expanded="true"] > * {
visibility: hidden;
}
and absolute positioning to make the content visible on top of the button.
I only have one issue: in Firefox the behavior is not the same if I press Space or Return while focusing the button. Return works as expected, but Space displays the content for a millisecond then hides it. It's probably a browser bug because accordion
handles Space and Return the same way.
Do you think it's a proper use of the accordion
script? Do you see any potential accessibilty issue in this implementation?
(Thanks for this and the tabs implementation!)
It would be nice if there was an openAll
method to complement closeAll
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.