Problem/Motivation

Very neat module.

Took a quick look at the accessibility of:
http://wimleers.com/demo/hierarchical-select/taxonomy

Ran into a few issues with WAVE:
http://wave.webaim.org/report?url=http%3A%2F%2Fwimleers.com%2Fdemo%2Fhie...

Mostly it's a matter of there not having labels. It would be useful to add some WAI-ARIA so that it is possible to alert Assistive Technology about changes in the content.

Update: test using SimplyTest.Me.

  • Spin up a test instance.
  • Edit the Article to make the Tags field use HS.
  • Edit user permissions so Anon can create Article nodes
  • Use the node edit form to test against http://wave.webaim.org/

Proposed resolution

Add hidden labels that are visible to screen readers

Remaining tasks

  • Patch
  • Review
  • Commit

User interface changes

Labels are added to each selector that are hidden to a standard user but seen by a screen reader.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

Status: Active » Needs review
FileSize
2.91 KB

Here's a patch that adds the missing labels.

It works well enough for my own purposes (normal hierarchical select elements), but the module also has a "flat select" option, and I haven't touched that in the current patch. It looks like it might need a similar treatment, though; this would be in the _hs_process_render_flat_select() function for anyone who is interested in trying to reroll the patch to add it.

mgifford’s picture

Just checked and it looks like this needs to be re-rolled against the repo:

git apply hierarchical-select-accessibility-labels-1764128-1.patch
error: patch failed: hierarchical_select.module:772
error: hierarchical_select.module: patch does not apply
error: patch failed: includes/theme.inc:122
error: includes/theme.inc: patch does not apply

mgifford’s picture

Just looking for progress on this issue. Coming from #1953836: Replace "Select a field type" with a hierarchical select.

Gold’s picture

Issue summary: View changes
Status: Needs review » Needs work

This looks to still be legit.

Rerolling now.

Gold’s picture

Rerolled the patch. Will update testing instructions given Wim's URL doesn't work any more.