mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-14 03:03:58 +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:
5
.changeset/neat-pigs-hunt.md
Normal file
5
.changeset/neat-pigs-hunt.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'slate-react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `aria-multiline` attribute to textbox editor
|
@@ -804,6 +804,7 @@ export const Editable = (props: EditableProps) => {
|
|||||||
<RestoreDOM node={ref} receivedUserInput={receivedUserInput}>
|
<RestoreDOM node={ref} receivedUserInput={receivedUserInput}>
|
||||||
<Component
|
<Component
|
||||||
role={readOnly ? undefined : 'textbox'}
|
role={readOnly ? undefined : 'textbox'}
|
||||||
|
aria-multiline={readOnly ? undefined : true}
|
||||||
{...attributes}
|
{...attributes}
|
||||||
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd
|
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd
|
||||||
// have to use hacks to make these replacement-based features work.
|
// have to use hacks to make these replacement-based features work.
|
||||||
|
Reference in New Issue
Block a user