-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Table block: the RichText within the table cells shouldn't have role=textbox and aria-multiline=true #12525
Comments
Current behaviour seems fine to me? What do you want to change? You are in a text area in a table cell. |
I'd like the cells editable areas to not be communicated as texareas. That means: removing role=textbox and aria-multiline=true when RichText is inside the table. That worked with the previous implementation of the Table block because the passed tag name was
doesn't make sense because |
Before the whole table was an editable field, so that made sense to me. Currently each cell is a editable field, not the whole table, so it is the same as placing a text area in each cell. They are no different from any other editable field, e.g. a caption. Both are text boxes and multiline. |
From a semantic perspective and considering how screen readers announce the current semantic, it's not the same thing. I'm just asking to restore the previous semantics, when the table cells were announced as editable table cells. Instead, now screen readers will announce a textarea within a table cell, which is potentially greatly confusing for users. This was the only reason why that exception was introduced. Can we please restore a similar behavior? 🙂 |
But they are text areas in a table cell? What can we change? |
Atm, we cannot have |
They're not textareas 🙂 They're
|
:) I'll rephrase my question... But they are semantically text areas?
That seems wrong? Why is a table cell any different from any other rich text instance? The cell is announced, so everything seems fine to me? |
A table element is very different from all the other elements, as there are relationships between the cells that are announced by screen readers. Quoting from the original PR #4074 (comment)
Later, we changed our mind about the List block and kept the exception only for the Table. |
So if we remove the attributes, rows and columns and current position is announced, and that's currently not the case?
The current implementation is the same as putting a text area element inside a table cell, so I don't really get what's different about it. |
Is this one still relevant?
Seems like the table info is still read. Not sure if that would be the case for Voiceover or not, but works well enough for NVDA. 👍 |
@afercia, can we close this issue? |
This issue is from 2018, long time has passed since then. I see that on Octobre 2020 #26582 added some gutenberg/packages/block-library/src/table/edit.js Lines 78 to 82 in ed4c2d3
so that for example the editable div element inside a normal table cell is announced as it announces While the added labeling helps I would argue the role is still wrong but I'm fine with closing this issue as there's now at least some feedback provided to users that they are inside a table cell. |
For all the usages of the RichText component within the various blocks, Gutenberg uses a
role=textbox
and anaria-multiline=true
attribute to make the editable field perceived by assistive technologies as equivalent of a<textarea>
element.The only exception used to be the Table block: a specific exception was coded a while ago:
gutenberg/packages/editor/src/components/rich-text/tinymce.js
Lines 356 to 364 in 68367b4
The rationale behind this exception is:
This worked but the Table block and RichText have seen some refactoring over time and now seems it doesn't work any longer:
As a consequence, screen readers announce a textarea within a table cell, which is potentially confusing for users:
The text was updated successfully, but these errors were encountered: