Comments (7)
Hello,
it can already be set up, at the beginning of the script:
var attr_control = 'data-controls',
attr_expanded = 'aria-expanded',
attr_labelledby = 'data-labelledby',
attr_hidden = 'data-hidden',
However, for "practical reasons" (especially on voice over, to avoid application mode if I remember well - ping @goetsu you will probably be able to explain why), it has been decided not to follow exactly the DP.
;)
from jquery-accessible-hide-show-aria.
I understand the reason but another accessibility expert, in an audit, told me to add "aria-controls", so...
I don't like to modify a library but if we have to... :-)
Thank you for your answer.
from jquery-accessible-hide-show-aria.
@juliemoynat you don't have to modify it because it's already something you can choose to add or not in the configuration ;)
@nico3333fr yes you remember well
from jquery-accessible-hide-show-aria.
In fact, if I remember well, for Voice over: if it detects certains ARIA attributes, it switches to application mode, and this mode implies more complicated keyboard combinations for the user.
As this component should be simple, this is why we set it up like mentionned before: it works without being more complicated for the users (difference between "accessibilité de terrain" - don't know how to say it in english and "accessibilité des référentiels").
However, your a11y expert and mine's are not wrong, it depends on the environment of the project and the point of view.
In a near future, I will rewrite this plugin in the same style of coding that the accordion one, allowing to pass a config on the call, and it should fix this issue without updating the code of the plugin.
from jquery-accessible-hide-show-aria.
Ok, so I was not so wrong about the fact that we have to modify plugin's code. Adding a variable will not just work, so we have to modify several lines of code (or maybe I'm wrong about the way I should do it...?).
from jquery-accessible-hide-show-aria.
At the beginning of the script, you need to replace
var attr_control = 'data-controls',
by
var attr_control = 'aria-controls',
that's all ;)
from jquery-accessible-hide-show-aria.
Ok!! So cool :-)
Thank you
from jquery-accessible-hide-show-aria.
Related Issues (20)
- Question about browser compatibility HOT 2
- Bug on Chrome HOT 2
- Toggle to show all at once HOT 2
- Are anchored link supported? HOT 6
- Why attributes names are variables ? HOT 2
- same selector in documentation HOT 1
- Animate the icons HOT 1
- Define your own classname only once HOT 1
- rails-assets.org compatibility HOT 5
- Add type="button" to buttons
- Handle appearance and no-js without setTimeout
- Open with anchor on the same page doesn't work (feature request)
- Why attach to element vs using button directly in HTML? HOT 1
- Toggle to show all at once *by group* HOT 2
- One button to collapse/expand them all - keyboard issue HOT 1
- Add possibility to separate styles HOT 1
- Add js- for classes used only by JS
- Add possibility to use aria attributes... or not
- Publish as npm package HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-accessible-hide-show-aria.