-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Tweaks for representation of the editor in the accessibility tree #5146
Conversation
It's been a while since we last heard from you. We are marking this pull request as stale due to inactivity. Please provide the requested feedback or the pull request will be closed after next 7 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVDA
First thing is that I'm not actually able to reproduce #4052
Control type is not informational (I believe it is announced as 'group')
I've downloaded the latest version of NVDA, and it seems to properly read the editor labels (putting aside fact that the editor labels seem to be read a bit redundantly). So it's hard to tell me how these changes impacted reading labels as I don't see that many differences, except of course read-only support. @Comandeer did you manage to reproduce the original issue?
Currently, NVDA will read focused editor as:
Rich Text Editor, [editor name]
Rich Text Editor, [editor name] Frame
Rich Text Editor, [editor name] Document
Edit Multi Line [text]
In the case of a11yhelp plugin:
Rich Text Editor, [editor name]
Rich Text Editor, [editor name] Frame, press Alt + 0 for help
Rich Text Editor, [editor name] Document
Edit Multi Line [text]
I'm wondering if that much information is really needed. I'm not an accessibility expert, but wouldn't be more helpful to just read something like:
Rich Text Editor, [editor name]
Editing Area
[text]
In the case of a11yhelp plugin:
Rich Text Editor, [editor name], press Alt + 0 for help
Editing Area
[text]
It seems more helpful to skip that much information for me but maybe missing some important cases here. @Comandeer could you help me to understand why we are giving so much information here and duplicating the message?
I suppose that it may be related to switching between another focusable element (like toolbar) in the editor, but in that case, reading Editing Area would still give the user feedback on what's happening.
VoiceOver
I didn't notice any difference except for different reading for read-only (which I suppose is good). It seems that VoiceOver doesn't care about reading Iframe titles at all.
JAWS
Running JAWS resulted in freezing my VM, so I'm going to get back to it soon.
Well, yes but actually no. I wasn't able to reproduce it on NVDA but I reproduced it on VO with Safari on desktop macOS.
Because there are three (or even four) labels:
Unfortunately, we reuse the same label for all of these places, which produces the effect you described. And that's the part I haven't fixed yet. There are two possible solutions here:
The second solution is far easier but could hinder the accessibility, e.g. removing the label for the application would make using features like VoiceOver's rotor more difficult (application regions wouldn't have names which makes their identification cumbersome or even impossible), and removing the So the first solution is preferred… yet, I thought really long about the labels and I didn't come up with anything sensible 😞. And that's what blocking me from finishing the work on this PR. |
To sum up our discussion with @Comandeer F2F, we will try to come up with a simplified version of these labels: Rich Text Editor, [editor name] It should reduce repetitive text while keeping a good level of accessibility for the different parts of the editor. Note that labels may be slightly different depending on results from another code iteration. |
Labels were far more difficult than I expected. I had to introduce So there are two distinctive labels:
The second one is used on editables and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm often getting duplicated information about the help button with NVDA and JAWS with the Iframe editor. It reads something like:
- Rich Text Editor, [editor name]
- Editor [editor name] Frame
- Press alt + 0 for help.
- Editor [editor name] document
- Press alt + 0 for help.
I'm not sure if it's valid from the accessibility point of view, but maybe it makes sense to read it only once?
I've also run into a bug where NVDA is reading labels literally twice - but I'm not sure if it's caused by a screen reader or the editor. Did you notice that issue during your tests?
I'm not fully confident that we should read so much information. I understand that technically it may make the editor less accessible by reading only some part of the editor (e.g. only frame) but it's a lot of information for a use case when the focus goes straight to editable. Anyway, I don't feel enough confident about how often there is a case when labeling all parts of the editor is important (and what % of our users it covers), so I'm leaving that up to @Comandeer.
The issue was not present in Firefox and in Chrome it's present only after refocusing the editor therefore I didn't catch it :/ It seems to be a screen reader error as the HTML code is correct and it works correctly in Firefox.
That's another thing that does not seem to be fixable… This info is added only once, as the |
I've updated tests and API docs for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very well, and the explanation given in #2445 (comment) should make it clear why we have chosen that approach.
Could you add a manual test with:
- disabled and changed
config.applicationTitle
property - disabled and changed
config.title
property?
I've added manual tests for labels, six in total:
I've also found a bug when an inline editable got the |
Co-authored-by: Jacek Bogdański <jacekbogd@gmail.com>
Co-authored-by: Jacek Bogdański <jacekbogd@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @Comandeer, these changes give much better control over editor accessibility compliance for integrators.
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
Did you follow the CKEditor 4 code style guide?
Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.
What is the proposed changelog entry for this pull request?
What changes did you make?
I've added missing
[role=textbox]
and[aria-multiline]
attributes forwysiwygarea
editors. I've also added[aria-readonly]
attribute to editors to indicate the status of the "readonliness" of the editor. However, for iframe-based editors it required adding also the[tabindex=0]
attribute to be actually read by screen readers. This change was implemented for all browsers except Firefox which has a bug connected with this attribute andiframe
s. It also means that marking read-onlyiframe
s does not work in Firefox.I didn't touch #2445 because I have no idea how to differentiate labels for applications and editables. But the changes introduced for read-only editors indicate such a need (NVDA now reads the same label thrice – probably due to it being the label of the application, the label of the editor, and the title of the editor's
iframe
). Probably it's something that we need to discuss further.Proposed changes should also fix #2499 but it needs further verification.
Which issues does your PR resolve?
Closes #4052.
Closes #1904.
Closes #2445.