mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-07 18:50:14 +00:00
Refacto aria attributes for svg (#34771)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
e4f661ba43
commit
b696206ae3
118
types/react/index.d.ts
vendored
118
types/react/index.d.ts
vendored
@@ -1447,65 +1447,8 @@ declare namespace React {
|
||||
*/
|
||||
}
|
||||
|
||||
interface HTMLAttributes<T> extends DOMAttributes<T> {
|
||||
// React-specific Attributes
|
||||
defaultChecked?: boolean;
|
||||
defaultValue?: string | string[];
|
||||
suppressContentEditableWarning?: boolean;
|
||||
suppressHydrationWarning?: boolean;
|
||||
|
||||
// Standard HTML Attributes
|
||||
accessKey?: string;
|
||||
className?: string;
|
||||
contentEditable?: boolean;
|
||||
contextMenu?: string;
|
||||
dir?: string;
|
||||
draggable?: boolean;
|
||||
hidden?: boolean;
|
||||
id?: string;
|
||||
lang?: string;
|
||||
placeholder?: string;
|
||||
slot?: string;
|
||||
spellCheck?: boolean;
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
title?: string;
|
||||
|
||||
// Unknown
|
||||
inputMode?: string;
|
||||
is?: string;
|
||||
radioGroup?: string; // <command>, <menuitem>
|
||||
|
||||
// WAI-ARIA
|
||||
role?: string;
|
||||
|
||||
// RDFa Attributes
|
||||
about?: string;
|
||||
datatype?: string;
|
||||
inlist?: any;
|
||||
prefix?: string;
|
||||
property?: string;
|
||||
resource?: string;
|
||||
typeof?: string;
|
||||
vocab?: string;
|
||||
|
||||
// Non-standard Attributes
|
||||
autoCapitalize?: string;
|
||||
autoCorrect?: string;
|
||||
autoSave?: string;
|
||||
color?: string;
|
||||
itemProp?: string;
|
||||
itemScope?: boolean;
|
||||
itemType?: string;
|
||||
itemID?: string;
|
||||
itemRef?: string;
|
||||
results?: number;
|
||||
security?: string;
|
||||
unselectable?: 'on' | 'off';
|
||||
}
|
||||
|
||||
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
|
||||
interface HTMLAttributes<T> extends DOMAttributes<T> {
|
||||
interface AriaAttributes {
|
||||
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
|
||||
'aria-activedescendant'?: string;
|
||||
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
||||
@@ -1692,6 +1635,63 @@ declare namespace React {
|
||||
'aria-valuetext'?: string;
|
||||
}
|
||||
|
||||
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
||||
// React-specific Attributes
|
||||
defaultChecked?: boolean;
|
||||
defaultValue?: string | string[];
|
||||
suppressContentEditableWarning?: boolean;
|
||||
suppressHydrationWarning?: boolean;
|
||||
|
||||
// Standard HTML Attributes
|
||||
accessKey?: string;
|
||||
className?: string;
|
||||
contentEditable?: boolean;
|
||||
contextMenu?: string;
|
||||
dir?: string;
|
||||
draggable?: boolean;
|
||||
hidden?: boolean;
|
||||
id?: string;
|
||||
lang?: string;
|
||||
placeholder?: string;
|
||||
slot?: string;
|
||||
spellCheck?: boolean;
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
title?: string;
|
||||
|
||||
// Unknown
|
||||
inputMode?: string;
|
||||
is?: string;
|
||||
radioGroup?: string; // <command>, <menuitem>
|
||||
|
||||
// WAI-ARIA
|
||||
role?: string;
|
||||
|
||||
// RDFa Attributes
|
||||
about?: string;
|
||||
datatype?: string;
|
||||
inlist?: any;
|
||||
prefix?: string;
|
||||
property?: string;
|
||||
resource?: string;
|
||||
typeof?: string;
|
||||
vocab?: string;
|
||||
|
||||
// Non-standard Attributes
|
||||
autoCapitalize?: string;
|
||||
autoCorrect?: string;
|
||||
autoSave?: string;
|
||||
color?: string;
|
||||
itemProp?: string;
|
||||
itemScope?: boolean;
|
||||
itemType?: string;
|
||||
itemID?: string;
|
||||
itemRef?: string;
|
||||
results?: number;
|
||||
security?: string;
|
||||
unselectable?: 'on' | 'off';
|
||||
}
|
||||
|
||||
interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
|
||||
// Standard HTML Attributes
|
||||
accept?: string;
|
||||
@@ -2205,7 +2205,7 @@ declare namespace React {
|
||||
// - "number | string"
|
||||
// - "string"
|
||||
// - union of string literals
|
||||
interface SVGAttributes<T> extends DOMAttributes<T> {
|
||||
interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
||||
// Attributes which also defined in HTMLAttributes
|
||||
// See comment in SVGDOMPropertyConfig.js
|
||||
className?: string;
|
||||
|
||||
114
types/react/v15/index.d.ts
vendored
114
types/react/v15/index.d.ts
vendored
@@ -2392,63 +2392,8 @@ declare namespace React {
|
||||
[propertyName: string]: any;
|
||||
}
|
||||
|
||||
interface HTMLAttributes<T> extends DOMAttributes<T> {
|
||||
// React-specific Attributes
|
||||
defaultChecked?: boolean;
|
||||
defaultValue?: string | string[];
|
||||
suppressContentEditableWarning?: boolean;
|
||||
|
||||
// Standard HTML Attributes
|
||||
accessKey?: string;
|
||||
className?: string;
|
||||
contentEditable?: boolean;
|
||||
contextMenu?: string;
|
||||
dir?: string;
|
||||
draggable?: boolean;
|
||||
hidden?: boolean;
|
||||
id?: string;
|
||||
lang?: string;
|
||||
slot?: string;
|
||||
spellCheck?: boolean;
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
title?: string;
|
||||
|
||||
// Unknown
|
||||
inputMode?: string;
|
||||
is?: string;
|
||||
radioGroup?: string; // <command>, <menuitem>
|
||||
|
||||
// WAI-ARIA
|
||||
role?: string;
|
||||
|
||||
// RDFa Attributes
|
||||
about?: string;
|
||||
datatype?: string;
|
||||
inlist?: any;
|
||||
prefix?: string;
|
||||
property?: string;
|
||||
resource?: string;
|
||||
typeof?: string;
|
||||
vocab?: string;
|
||||
|
||||
// Non-standard Attributes
|
||||
autoCapitalize?: string;
|
||||
autoCorrect?: string;
|
||||
autoSave?: string;
|
||||
color?: string;
|
||||
itemProp?: string;
|
||||
itemScope?: boolean;
|
||||
itemType?: string;
|
||||
itemID?: string;
|
||||
itemRef?: string;
|
||||
results?: number;
|
||||
security?: string;
|
||||
unselectable?: boolean;
|
||||
}
|
||||
|
||||
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
|
||||
interface HTMLAttributes<T> extends DOMAttributes<T> {
|
||||
interface AriaAttributes {
|
||||
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
|
||||
'aria-activedescendant'?: string;
|
||||
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
||||
@@ -2635,6 +2580,61 @@ declare namespace React {
|
||||
'aria-valuetext'?: string;
|
||||
}
|
||||
|
||||
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
||||
// React-specific Attributes
|
||||
defaultChecked?: boolean;
|
||||
defaultValue?: string | string[];
|
||||
suppressContentEditableWarning?: boolean;
|
||||
|
||||
// Standard HTML Attributes
|
||||
accessKey?: string;
|
||||
className?: string;
|
||||
contentEditable?: boolean;
|
||||
contextMenu?: string;
|
||||
dir?: string;
|
||||
draggable?: boolean;
|
||||
hidden?: boolean;
|
||||
id?: string;
|
||||
lang?: string;
|
||||
slot?: string;
|
||||
spellCheck?: boolean;
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
title?: string;
|
||||
|
||||
// Unknown
|
||||
inputMode?: string;
|
||||
is?: string;
|
||||
radioGroup?: string; // <command>, <menuitem>
|
||||
|
||||
// WAI-ARIA
|
||||
role?: string;
|
||||
|
||||
// RDFa Attributes
|
||||
about?: string;
|
||||
datatype?: string;
|
||||
inlist?: any;
|
||||
prefix?: string;
|
||||
property?: string;
|
||||
resource?: string;
|
||||
typeof?: string;
|
||||
vocab?: string;
|
||||
|
||||
// Non-standard Attributes
|
||||
autoCapitalize?: string;
|
||||
autoCorrect?: string;
|
||||
autoSave?: string;
|
||||
color?: string;
|
||||
itemProp?: string;
|
||||
itemScope?: boolean;
|
||||
itemType?: string;
|
||||
itemID?: string;
|
||||
itemRef?: string;
|
||||
results?: number;
|
||||
security?: string;
|
||||
unselectable?: boolean;
|
||||
}
|
||||
|
||||
interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
|
||||
// Standard HTML Attributes
|
||||
accept?: string;
|
||||
@@ -3133,7 +3133,7 @@ declare namespace React {
|
||||
// - "number | string"
|
||||
// - "string"
|
||||
// - union of string literals
|
||||
interface SVGAttributes<T> extends DOMAttributes<T> {
|
||||
interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
||||
// Attributes which also defined in HTMLAttributes
|
||||
// See comment in SVGDOMPropertyConfig.js
|
||||
className?: string;
|
||||
|
||||
Reference in New Issue
Block a user