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

An ADA issue: «the state (selected/not selected) of the view modes i.e., Grid and List is not announced by the screen reader» #43

Open
dmitrii-fediuk opened this issue Dec 1, 2018 · 1 comment
Labels

Comments

@dmitrii-fediuk
Copy link
Contributor

kitchencollection.com/kitchen-gadgets

10

Code snippet

<div class="modes"> <strong class="modes-label" id="modes-label">View as</strong> <!-- 2018-10-28 Dmitry Fedyuk https://www.upwork.com/fl/mage2pro "An ADA issue: the «View as Grid» button of the frontend product list page is read as plain text by the screen reader. This can be misleading as the screen reader user won’t be able to identify the nature or role of the button.": https://github.com/kitchencollection-com/core/issues/33 --><strong title="Grid" class="modes-mode active mode-grid" data-role="mode-switcher" data-value="grid" tabindex="0"><span>Grid</span></strong> <a class="modes-mode mode-list" title="List" href="#" data-role="mode-switcher" data-value="list" id="mode-list" aria-labelledby="modes-label mode-list"><span>List</span></a> </div>

Rationale

A particularly important state of a user interface control is whether or not it has focus. The focus state of a control can be programmatically determined, and notifications about change of focus are sent to user agents and assistive technology. Other examples of user interface control state are whether or not a checkbox or radio button has been selected, or whether or not a collapsible tree or list node is expanded or collapsed.

Recommendations

Remove tabindex from <strong> having class="modes-mode active mode-grid" also provide visually hidden text under same <strong>.
And provide a relevant label to the <a> having class="modes-mode mode-list", using aria-label or aria-labelledby attribute.
Or Implement the link as tab.

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

No branches or pull requests

1 participant