Skip to content

Commit

Permalink
Attempt to tell screen readers that the post title is a textarea fiel…
Browse files Browse the repository at this point in the history
…d. (#35898)
  • Loading branch information
alexstine authored Oct 26, 2021
1 parent 2ecc9a4 commit 77a2e0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,16 @@ export default function PostTitle() {
preserveWhiteSpace: true,
} );

/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-interactions */
/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
return (
<PostTypeSupportCheck supportKeys="title">
<h1
ref={ useMergeRefs( [ richTextRef, ref ] ) }
contentEditable
className={ className }
aria-label={ decodedPlaceholder }
role="textbox"
aria-multiline="true"
onFocus={ onSelect }
onBlur={ onUnselect }
onKeyDown={ onKeyDown }
Expand All @@ -215,5 +217,5 @@ export default function PostTitle() {
/>
</PostTypeSupportCheck>
);
/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-interactions */
/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
}

0 comments on commit 77a2e0e

Please sign in to comment.