Skip to content

Table block: the RichText within the table cells shouldn't have role=textbox and aria-multiline=true #12525

Closed
@afercia

Description

For all the usages of the RichText component within the various blocks, Gutenberg uses a role=textbox and an aria-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:

/*
* The role=textbox and aria-multiline=true must always be used together
* as TinyMCE always behaves like a sort of textarea where text wraps in
* multiple lines. Only the table block editable element is excluded.
*/
if ( tagName !== 'table' ) {
ariaProps.role = 'textbox';
ariaProps[ 'aria-multiline' ] = true;
}

The rationale behind this exception is:

  • all the other blocks editable areas need to be communicated to assistive technologies like a textarea (some doubts were expressed about the List block)
  • instead, the Table block needs to keep the table native semantic, and the table cells need to be communicated as editable cells

This worked but the Table block and RichText have seen some refactoring over time and now seems it doesn't work any longer:

screenshot 2018-12-02 at 17 00 32

As a consequence, screen readers announce a textarea within a table cell, which is potentially confusing for users:

screenshot 2018-12-02 at 16 32 54

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Needs DecisionNeeds a decision to be actionable or relevant[Block] TableAffects the Table Block[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions