Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16139 closed defect (fixed)

[PATCH][CCLA] dijit.Editor - Need a way to set aria-label on toolbar

Reported by: mikeb Owned by: bill
Priority: undecided Milestone: 1.8.4
Component: Editor Version: 1.8.0
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

According to WAI-ARIA spec for role="toolbar", "Authors MUST supply an aria-label property on each toolbar when the application contains more than one toolbar."

There is no problem for a regular dijit.Toolbar because the author can just specify "aria-label" attribute when creating the dijit.

However, this is a problem for Editor, which creates its own Toolbar. The only way I have been able to change/add this attribute to a toolbar created by an Editor is by doing:

dijit.byId("my-editor").toolbar.set("aria-label","my label");

I think that we should change the Editor to automatically add this attribute to the toolbar to make it easier for the user to create accessible pages with Editors. Otherwise, if you create an editor declaritively, you need to remember to take extra steps and set the aria-label on the toolbar. Also, since the Editor takes care of setting up the Toolbar and all of its functionality, it seems like the responsibility to set aria-label should go to the Editor.

The attached patch just sets the "aria-label" attribute of the toolbar to the ID of the Editor. JAWS now reads the Editor's ID and then "toolbar" when you tab into it (instead of just "toolbar".)

I couldn't decide if the label shoudl be set to the ID or the "name" attribute. It seems like authors would use "name" for a more user friendly name...but if they do not include name, _editor/RichText sets the name as "{id}_AUTOGEN" which could be more confusing to a screen reader user.

Attachments (2)

add-label-to-editors-toolbar.patch (405 bytes) - added by mikeb 7 years ago.
make the Editor automatically set the aria-label attribute on Toolbars, please proxy commit for Michael Billau CCLA on file with IBM
backport-accessibility-fixes-to-editor-ticket-16139.patch (43.0 KB) - added by mikeb 7 years ago.
Backport accessibility fixes to _editor, please proxy commit for michael billau

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by mikeb

make the Editor automatically set the aria-label attribute on Toolbars, please proxy commit for Michael Billau CCLA on file with IBM

comment:1 Changed 7 years ago by mikeb

Cc: Douglas Hays added

comment:2 Changed 7 years ago by bill

Milestone: tbd1.9

comment:3 Changed 7 years ago by bill

Owner: set to bill
Resolution: fixed
Status: newclosed

In [29804]:

Various aria fixes for Editor, plus accessibility updates to test files, patches from Mike Billau (IBM, CCLA), fixes #16139, #16140 !strict

comment:4 Changed 7 years ago by Douglas Hays

In [29922]:

Fixes #16139. Fix _TimePicker to avoid duplicate times.

comment:5 Changed 7 years ago by Douglas Hays

[29922] is for #16319

comment:6 Changed 7 years ago by mikeb

Hello. Is there any way that we can backport these fixes to 1.8 branch? I created a patch using [29804]. All of the files are the same between the nightly build and this patched 1.8 except for _editor/RichText.js, which in the nightly build uses domReady instead of ready as per [29511], which was not backported.

Changed 7 years ago by mikeb

Backport accessibility fixes to _editor, please proxy commit for michael billau

comment:7 Changed 7 years ago by bill

The fixes seem fairly safe, in the end they are just setting aria attributes plus the iframe's title.

comment:8 Changed 7 years ago by Douglas Hays

In [30311]:

Refs #16139, #16140. Backport [29804] to 1.8. !strict

comment:9 Changed 7 years ago by Douglas Hays

Milestone: 1.91.8.4
Note: See TracTickets for help on using tickets.