1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Add aria-multiline attribute to textbox editor (#5100)

* Add `aria-multiline` attribute to textbox editor

* Add a changeset
This commit is contained in:
Kitty Giraudel 2022-09-06 06:16:10 +02:00 committed by GitHub
parent 55b9574097
commit 8eb1972b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
'slate-react': patch
---
Add `aria-multiline` attribute to textbox editor

View File

@ -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.