Skip to content

Commit 8121e01

Browse files
authored
🤖 Merge PR DefinitelyTyped#72166 [react] Backport DefinitelyTyped#63076 and DefinitelyTyped#65621 to v17 by @awx-doma-lei
1 parent 92c3c05 commit 8121e01

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

‎types/react/v17/index.d.ts‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,16 @@ declare namespace React {
15911591
* presented if they are made.
15921592
*/
15931593
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
1594+
/**
1595+
* Defines a string value that labels the current element, which is intended to be converted into Braille.
1596+
* @see aria-label.
1597+
*/
1598+
"aria-braillelabel"?: string | undefined;
1599+
/**
1600+
* Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
1601+
* @see aria-roledescription.
1602+
*/
1603+
"aria-brailleroledescription"?: string | undefined;
15941604
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
15951605
"aria-busy"?: Booleanish | undefined;
15961606
/**
@@ -1608,6 +1618,11 @@ declare namespace React {
16081618
* @see aria-colcount @see aria-colspan.
16091619
*/
16101620
"aria-colindex"?: number | undefined;
1621+
/**
1622+
* Defines a human readable text alternative of aria-colindex.
1623+
* @see aria-rowindextext.
1624+
*/
1625+
"aria-colindextext"?: string | undefined;
16111626
/**
16121627
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
16131628
* @see aria-colindex @see aria-rowspan.
@@ -1625,6 +1640,11 @@ declare namespace React {
16251640
* @see aria-labelledby
16261641
*/
16271642
"aria-describedby"?: string | undefined;
1643+
/**
1644+
* Defines a string value that describes or annotates the current element.
1645+
* @see related aria-describedby.
1646+
*/
1647+
"aria-description"?: string | undefined;
16281648
/**
16291649
* Identifies the element that provides a detailed, extended description for the object.
16301650
* @see aria-describedby.
@@ -1749,6 +1769,11 @@ declare namespace React {
17491769
* @see aria-rowcount @see aria-rowspan.
17501770
*/
17511771
"aria-rowindex"?: number | undefined;
1772+
/**
1773+
* Defines a human readable text alternative of aria-rowindex.
1774+
* @see aria-colindextext.
1775+
*/
1776+
"aria-rowindextext"?: string | undefined;
17521777
/**
17531778
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
17541779
* @see aria-rowindex @see aria-colspan.
@@ -2503,6 +2528,9 @@ declare namespace React {
25032528
width?: number | string | undefined;
25042529
disablePictureInPicture?: boolean | undefined;
25052530
disableRemotePlayback?: boolean | undefined;
2531+
2532+
onResize?: ReactEventHandler<T> | undefined;
2533+
onResizeCapture?: ReactEventHandler<T> | undefined;
25062534
}
25072535

25082536
// this list is "complete" in that it contains every SVG attribute

‎types/react/v17/test/elementAttributes.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const testCases = [
4040
<svg>
4141
<image crossOrigin="anonymous" />
4242
</svg>,
43-
<details open={true} onToggle={() => {}} name="foo" />,
43+
<details open={true} onToggle={() => { }} name="foo" />,
4444
<input value={["one", "two"] as readonly string[]} />,
4545
<input value={["one", "two"] as string[]} />,
4646
<input value={["one", "two"]} />,
@@ -124,4 +124,13 @@ const eventCallbacksTestCases = [
124124
<meter onClick={e => e.currentTarget.optimum} />,
125125
<output onClick={e => e.currentTarget.value} />,
126126
<time onClick={e => e.currentTarget.dateTime} />,
127+
<video onResize={e => e.currentTarget} onResizeCapture={e => e.currentTarget} />
127128
];
129+
130+
const ariaAttributesTestCases = [
131+
<a aria-braillelabel="a" />,
132+
<a aria-brailleroledescription="a" />,
133+
<a aria-colindextext="a" />,
134+
<a aria-rowindextext="a" />,
135+
<a aria-description="a" />,
136+
]

0 commit comments

Comments
 (0)