pretty-dropdowns icon indicating copy to clipboard operation
pretty-dropdowns copied to clipboard

small accessibility issue

Open ecxmwo opened this issue 6 years ago • 2 comments

Hi,

your plugin was the only one which I found is lightweight, uses a real

One accessibility issue I noticed when testing with NVDA screenreader is that the focused option is not read in screenreader. Only after you click on it or choose it with ENTER. This you can very easily solve. Just insert $dropdown.attr('aria-activedescendant', $li.attr('id')); in toggleHover() and give $dropdown as reference.

This is what the aria-activedescendant is meant for (https://www.w3.org/WAI/GL/wiki/Using_aria-activedescendant_to_allow_changes_in_focus_within_widgets_to_be_communicated_to_Assistive_Technology)

And be sure to reset the activedescendent in resetDropdown() - e.g. if ESC was pressed and the focused entry was not chosen: $dropdown.attr('aria-activedescendant', $dropdown.children('.selected').attr('id')); otherwise the currently selected entry will not be read correctly by the screenreader.

ecxmwo avatar Jan 09 '19 12:01 ecxmwo

Thanks for the report and fix. Would it be possible for you to do a PR?

thdoan avatar Jan 18 '19 23:01 thdoan

@ecxmwo This has been fixed in v4.15.0. Please update plugin and close if verified. Thanks for reporting this.

thdoan avatar Jun 09 '19 04:06 thdoan