From efc0c9c441157bae29e5101432c8b342b86a2c69 Mon Sep 17 00:00:00 2001 From: David Johnston Date: Wed, 17 Feb 2021 14:36:10 +1100 Subject: [PATCH] Update DraftailEditor.js Suuport https://github.com/springload/draftail/issues/436 --- lib/components/DraftailEditor.js | 18 ++++++++++++++++++ lib/draftail.d.ts | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/lib/components/DraftailEditor.js b/lib/components/DraftailEditor.js index f835519a..b06214cd 100644 --- a/lib/components/DraftailEditor.js +++ b/lib/components/DraftailEditor.js @@ -102,6 +102,12 @@ type Props = {| autoCorrect: ?string, /** See https://draftjs.org/docs/api-reference-editor.html#aria-props. */ ariaDescribedBy: ?string, + ariaExpanded: ?boolean, + ariaLabel: ?string, + ariaLabelledBy: ?string, + ariaMultiline: ?boolean, + ariaOwneeID: ?string, + ariaRequired: ?string, /** List of the available block types. */ blockTypes: $ReadOnlyArray<{| ...ControlProp, @@ -931,6 +937,12 @@ class DraftailEditor extends Component { autoComplete, autoCorrect, ariaDescribedBy, + ariaExpanded, + ariaLabel, + ariaLabelledBy, + ariaMultiline, + ariaOwneeID, + ariaRequired, blockTypes, inlineStyles, entityTypes, @@ -1010,6 +1022,12 @@ class DraftailEditor extends Component { autoComplete={autoComplete} autoCorrect={autoCorrect} ariaDescribedBy={ariaDescribedBy} + ariaExpanded={ariaExpanded} + ariaLabel={ariaLabel} + ariaLabelledBy={ariaLabelledBy} + ariaMultiline={ariaMultiline} + ariaOwneeID={ariaOwneeID} + ariaRequired={ariaRequired} handleReturn={this.handleReturn} defaultKeyBindings={false} handleKeyCommand={this.handleKeyCommand} diff --git a/lib/draftail.d.ts b/lib/draftail.d.ts index 9c2aa6f4..961e6745 100644 --- a/lib/draftail.d.ts +++ b/lib/draftail.d.ts @@ -171,6 +171,12 @@ declare namespace Draftail { autoCorrect?: string | null; /** See https://draftjs.org/docs/api-reference-editor.html#aria-props. */ ariaDescribedBy?: string | null; + ariaExpanded: ?boolean; + ariaLabel: ?string; + ariaLabelledBy: ?string; + ariaMultiline: ?boolean; + ariaOwneeID: ?string; + ariaRequired: ?string; /** List of the available block types. */ blockTypes?: BlockType[]; /** List of the available inline styles. */