Skip to content
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

Semantics of Post Title in Code Editor differ from that in Visual Editor #56633

Closed
getdave opened this issue Nov 29, 2023 · 1 comment
Closed
Assignees
Labels
Needs Accessibility Feedback Need input from accessibility [Package] Editor /packages/editor

Comments

@getdave
Copy link
Contributor

getdave commented Nov 29, 2023

In #54718 the element used to render the Post Title when in "Code View" mode in the editor was changed to a textarea. This was to facilitate the usage of plaintext in the code view to expose HTML tags to the user.

This differs from the <h1> which is used for the title in the Visual Mode.

That said both options expose as a role of textbox and have a label.

The question is, is there any accessibility regression here? Does it matter that the two do not match the element even though they expose identical roles?

Replication Instructions

  • New Post
  • Check semantics of the Post title and check it is accessible.
  • Switch to Code View with ⇧⌥⌘M (shift + option + cmd + M) - or just use the editor options menu.
  • Check semantics of the Post title and check it is accessible.

Regarding accessibility, the title element has been changed from h1 to the textarea. I tested it with a screen reader (NVDA) and it reads the placeholder "Add title", but I'm concerned that the semantics of the document have been lost.

Originally posted by @t-hamano in #56582 (review)

@getdave getdave added the Needs Accessibility Feedback Need input from accessibility label Nov 29, 2023
@getdave getdave self-assigned this Nov 29, 2023
@jordesign jordesign added the [Package] Editor /packages/editor label Nov 29, 2023
@jeryj
Copy link
Contributor

jeryj commented Nov 29, 2023

The semantics that get exposed for both are the same. They are both considered a textbox with a label of "Add Title". The H1 there, I believe, is used for styling purposes so the editor and frontend site both use the same h1 CSS.

@jeryj jeryj closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Accessibility Feedback Need input from accessibility [Package] Editor /packages/editor
Projects
None yet
Development

No branches or pull requests

3 participants