-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Accessibility issues #765
Comments
Of the warnings, the only one I am personally concerned about fixing is the one you quoted. The rest are styling concerns that I'll leave up to the user and their CSS. The error you quoted has to do with buttons that are hidden, without content, but still exist in the DOM. When the buttons are visible there is no error because they meet the criteria at that point (have content that counts as a name). So the real fix here would be for me to rework things so that the buttons aren't in the DOM at all when they are not being used. The reason for the hidden buttons in the DOM is so that the browser will go ahead and load the background images, avoiding the flash of unstyled content when Colorbox is first opened. I assume screen readers are intelligent enough not to read out hidden elements, so I doubt fixing the error would help anyone in practice. |
True that but at the moment there are not so tech savvy people (bosses and So, I wonder if you could apply the same fix for all buttons. If you think Thanks!
|
Does anyone have a patch, hack or instructions for eliminating this accessibility error? I'm in the public sector here, and our site has received a complaint letter. At this point I need to fix these errors, or I have to replace Colorbox altogether. Thanks for any help. |
@jackmoore The appropriate smart loading fix would take significant time to study the whole codebase. The other one I already have a quick fix. thanks |
The aproach here adds button text from colorbox defaults at page load time to avoid the following errors reported by accessibility tests: * wave.webaim.org: A button is empty or has no value text. * HTML_CodeSniffer WCAG 2.0 Level AAA: This button element does not have a name available to an accessibility API. Valid names are: title attribute, element content.
The approach here adds button text from colorbox defaults at page load time to avoid the following errors reported by accessibility tests: * wave.webaim.org: A button is empty or has no value text. * HTML_CodeSniffer WCAG 2.0 Level AAA: This button element does not have a name available to an accessibility API. Valid names are: title attribute, element content.
This is a formal approach to fixing jackmoore#765 with proper use of Aria attributes as an alternative to PR jackmoore#821. Changes include: * Add `aria-hidden` attributes on the dialog box and navigational buttons. * Update the `aria-hidden` value to `true` or `false` at the appropriate times. * Add `aria-label` attributes to navigational buttons, using the colorbox default settings at page load time, and then update the value when a colorbox is loaded. * Add `aria-labelledby` and `aria-describedby` attributes to the div containing `role='dialog'`.
I've just created two PRs that address this issue in different ways:
#822 - Implements improved Accessibility with proper Aria attributes. Edit: #822 has been fixed to pass both HTML_CodeSniffer and http://wave.webaim.org , I'll close #821 . Edit 2: #832 adds upon #822 with some additional accessibility tweaks. |
Unless the item is |
* Aria Accessibility compliance. fixes jackmoore#765 This is a formal approach to fixing jackmoore#765 with proper use of Aria attributes as an alternative to PR jackmoore#821. Changes include: * Add `aria-hidden` attributes on the dialog box and navigational buttons. * Update the `aria-hidden` value to `true` or `false` at the appropriate times. * Add `aria-label` attributes to navigational buttons, using the colorbox default settings at page load time, and then update the value when a colorbox is loaded. * Add `aria-labelledby` and `aria-describedby` attributes to the div containing `role='dialog'`. * Pass HTML_CodeSniffer WCAG 2.0 tests * Cleanup unneeded aria-labels, fix autoreading of dialog by using ARIA live regions and ensure focus is on the first element in the dialog when it opens * Fix spelling of 'aria-label' * Cleanup unneeded aria-labels, fix autoreading of dialog by using ARIA live regions and ensure focus is on the first element in the dialog when it opens * Reworked focus trapping * Updated minified version Co-authored-by: James Wilson <jrwilson3@gmail.com> Co-authored-by: <bramd@brams-hp.localdomain> Co-authored-by: Bram Duvigneau <bram@bramd.nl>
The latest version throws a few accessibility errors. An example is your first one using html_codesniffer using WCAG2AA:
The text was updated successfully, but these errors were encountered: