Skip to content

Commit

Permalink
Apply jackmoore#765 a11y improvements (#1)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Dec 14, 2021
1 parent d6490ea commit 4d7a831
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 43 deletions.
Loading

0 comments on commit 4d7a831

Please sign in to comment.