Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Set the ARIA role of button to elements with the data-role="button" attribute #4698
I think we do set it to role=button in cases where it makes sense (maybe within some of our other controls?), but generally our link-based "buttons" are often still playing the role of a link, so I'm not sure this change would make sense broadly. Perhaps it'd be better to do this manually when you have to use anchors in a button-like situation (form controls, widgets, etc).
On Jul 13, 2012, at 5:01 PM, Aaron Cannon wrote:
When you say "generally our link-based "buttons" are
Sorry, I'm not as familiar with this library as I would like to be.
Thanks for your help!
The JQM data-role="button" means that an element gets button styling. It still can be different things: a link that is used to navigate or a button to control something. Only the latter should have role="button".
In the button widget I see a comment "add ARIA role" but I don't actually see it being applied. It seems that we never add it so that is something we could look into.
Edit: Collapsible heading should probably get the button role as well.
For 1.4 we are making changes to generated markup for buttons. We are doing this refactor in branch "next". Before we add the code that sets the ARIA attribute, I wanted to check some things with you.
Anchor elements with
There are a few other cases in which I am not sure if we need to add a ARIA role. Those are:
I would really appreciate your input here. Thanks a lot!
Update: I changed
Button elements, or submit or reset buttons don't need a role of button, as they automatically get that role assigned by virtue of their type.
The other items you listed sound like they should get the role="button" attribute, except for the last. Checkboxes and radio buttons, and in fact all other form elements should keep their natively assigned roles.
If we can come up with a set of tests for all of these cases, I'd be happy to review them with Voice Over on a Mac, Jaws and NVDA on Windows in various browsers, and with voice over on the iPhone, to insure that these changes have the desired effect.
Thanks, and please let me know if you have any further questions.
As Aaron already alluded, where native tags are used, eg or , no ARIA roles are necessary as we get all the benefit from the native semantics. However, where an element behaves like a button but is not marked as such, the role of button will be appropriate.
referenced this issue
Jul 4, 2013
Sounds about right to me.
Find me on Twitter http://www.twitter.com/vick08
On Jul 17, 2013, at 7:53 AM, gabrielschulhof email@example.com wrote: