Skip to content

Allow rendering complex HTML screen reader content when using the EditContext API #251619

Open
@aiday-mar

Description

@aiday-mar

Currently the input is powered by one of two methods:

  • The hidden text-area
<textarea>
content
</textarea>
  • The EditContext API
<div editContext>
content
</div>

In both cases the content is rendered as hidden plain text with the font-size and font-family defined in the settings. This will be an issue in the future when variable font sizes are adopted. If we set decorations so that a part of the editor text should have a non-default font-size and font-family, we'd like the screen readers to still correctly track the modified text position with the modified font-size and font-family. As such we need to render the screen reader with a complex HTML structure which reflects the variable font-size and font-family. This will only be possible when the EditContext API is enabled because it is not possible to define a text-area with variable font-sizes within it. In essence the feature request is to allow rendering the hidden EditContext screen reader content as follows:

<div editContext>
<div><span>content line 1 </span></div>
<div><span>content line 2 </span></div>
<div><span>content line 3 </span></div>
....
</div>

cc @meganrogge

Metadata

Metadata

Assignees

Labels

accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issueseditor-edit-contexteditor-linesIssues related to editor linesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions