Skip to content

Commit

Permalink
Add aria-multiline attribute to textbox editor (#5100)
Browse files Browse the repository at this point in the history
* Add `aria-multiline` attribute to textbox editor

* Add a changeset
  • Loading branch information
KittyGiraudel authored Sep 6, 2022
1 parent 55b9574 commit 8eb1972
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-pigs-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate-react': patch
---

Add `aria-multiline` attribute to textbox editor
1 change: 1 addition & 0 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ export const Editable = (props: EditableProps) => {
<RestoreDOM node={ref} receivedUserInput={receivedUserInput}>
<Component
role={readOnly ? undefined : 'textbox'}
aria-multiline={readOnly ? undefined : true}
{...attributes}
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd
// have to use hacks to make these replacement-based features work.
Expand Down

0 comments on commit 8eb1972

Please sign in to comment.