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

Missing button group role attribute #21867

Closed
thbt opened this issue Jan 28, 2017 · 2 comments
Closed

Missing button group role attribute #21867

thbt opened this issue Jan 28, 2017 · 2 comments

Comments

@thbt
Copy link

thbt commented Jan 28, 2017

In the v3 documentation you were using role="group" or role="toolbar" for buttons group, but you dropped these in the v4 documentation. This should be included in the v4 doc as it pushes good accessibility practices.

@patrickhlauke
Copy link
Member

the v4 equivalent of the v3 page you mention is https://v4-alpha.getbootstrap.com/components/button-group/ which does still include those role attributes. the example code from the button plugins lacks the role in both the v3 and v4 documentation currently.

what v4 does lack is the accessibility callout in the button group documentation, something that should probably be re-included.

it's debatable whether or not the role="group" makes any tangible difference in terms of accessibility in the case of those visually grouped radio buttons...it serves roughly the same purpose as a <fieldset>, and the aria-label acts a bit like a <legend> - though the behavior is not exactly the same in AT. i guess it could be included, but more for consistency than any hard benefit for AT users.

one concern i'd have is that role="group" and role="toolbar" have some quite specific connotations - see https://www.w3.org/TR/wai-aria/roles#group and https://www.w3.org/TR/wai-aria/roles#toolbar - and depending what authors end up doing (e.g. "perverting" the use of button group/button toolbars to do things other than grouped controls/toolbars) it may result in pages that are more broken than those without any roles defined...but i guess that's a problem that can never be fully addressed.

@patrickhlauke
Copy link
Member

patrickhlauke commented Apr 16, 2017

the roles have now, from what i can see, been added to https://v4-alpha.getbootstrap.com/components/button-group/

leaving https://v4-alpha.getbootstrap.com/components/buttons/#checkbox-and-radio-buttons aside for now as i plan to redo this part separately, and current example works/makes sense even without role="group" (as it's more of a nice-to-have)

have a PR to add the callout from v3 to v4 #22455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants