From a40ef34fa6d1122bdfdb708f79b90de9edb2827d Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Mon, 12 Sep 2022 17:12:37 -0700 Subject: [PATCH] fix: remove readonly from DetailsList (#24615) Removes readonly semantics so nested interactive items do not inherit the readonly state. --- ...-8abf788f-1d0f-484c-a725-1d2fa5981f8f.json | 7 +++++ .../DetailsList/DetailsList.base.tsx | 1 - .../DetailsList/DetailsRowFields.tsx | 1 - .../__snapshots__/DetailsColumn.test.tsx.snap | 1 - .../__snapshots__/DetailsList.test.tsx.snap | 27 ------------------- .../__snapshots__/DetailsRow.test.tsx.snap | 7 ----- .../ShimmeredDetailsList.test.tsx.snap | 1 - 7 files changed, 7 insertions(+), 38 deletions(-) create mode 100644 change/@fluentui-react-8abf788f-1d0f-484c-a725-1d2fa5981f8f.json diff --git a/change/@fluentui-react-8abf788f-1d0f-484c-a725-1d2fa5981f8f.json b/change/@fluentui-react-8abf788f-1d0f-484c-a725-1d2fa5981f8f.json new file mode 100644 index 00000000000000..4ef2aac77fda47 --- /dev/null +++ b/change/@fluentui-react-8abf788f-1d0f-484c-a725-1d2fa5981f8f.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: remove readonly semantics from DetailsList", + "packageName": "@fluentui/react", + "email": "sarah.higley@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react/src/components/DetailsList/DetailsList.base.tsx b/packages/react/src/components/DetailsList/DetailsList.base.tsx index 15901cdf9adc94..47e41c1c84a02d 100644 --- a/packages/react/src/components/DetailsList/DetailsList.base.tsx +++ b/packages/react/src/components/DetailsList/DetailsList.base.tsx @@ -680,7 +680,6 @@ const DetailsListInner: React.ComponentType = ( aria-label={ariaLabelForGrid || ariaLabel} aria-rowcount={isPlaceholderData ? 0 : rowCount} aria-colcount={colCount} - aria-readonly="true" aria-busy={isPlaceholderData} >
diff --git a/packages/react/src/components/DetailsList/DetailsRowFields.tsx b/packages/react/src/components/DetailsList/DetailsRowFields.tsx index cb047fda828918..751d09de975312 100644 --- a/packages/react/src/components/DetailsList/DetailsRowFields.tsx +++ b/packages/react/src/components/DetailsList/DetailsRowFields.tsx @@ -65,7 +65,6 @@ export const DetailsRowFields: React.FunctionComponent = key={key} id={column.isRowHeader ? rowHeaderId : undefined} role={column.isRowHeader ? 'rowheader' : 'gridcell'} - aria-readonly className={css( column.className, column.isMultiline && rowClassNames.isMultiline, diff --git a/packages/react/src/components/DetailsList/__snapshots__/DetailsColumn.test.tsx.snap b/packages/react/src/components/DetailsList/__snapshots__/DetailsColumn.test.tsx.snap index 35c9f4e99449af..67ec0d86b8e8d5 100644 --- a/packages/react/src/components/DetailsList/__snapshots__/DetailsColumn.test.tsx.snap +++ b/packages/react/src/components/DetailsList/__snapshots__/DetailsColumn.test.tsx.snap @@ -35,7 +35,6 @@ exports[`DetailsColumn renders a sortable icon on an unsorted column when showSo >
diff --git a/packages/react/src/components/DetailsList/__snapshots__/DetailsList.test.tsx.snap b/packages/react/src/components/DetailsList/__snapshots__/DetailsList.test.tsx.snap index 7b1c4d40c02352..85eef9d098d8e0 100644 --- a/packages/react/src/components/DetailsList/__snapshots__/DetailsList.test.tsx.snap +++ b/packages/react/src/components/DetailsList/__snapshots__/DetailsList.test.tsx.snap @@ -36,7 +36,6 @@ exports[`DetailsList handles paged updates to items within groups 1`] = ` >
@@ -302,7 +301,6 @@ exports[`DetailsList handles paged updates to items within groups 2`] = ` >
@@ -584,7 +582,6 @@ exports[`DetailsList handles updates to items and groups 1`] = ` >
@@ -952,7 +949,6 @@ exports[`DetailsList handles updates to items and groups 2`] = ` >
@@ -1320,7 +1316,6 @@ exports[`DetailsList handles updates to items and groups 3`] = ` >
@@ -1602,7 +1597,6 @@ exports[`DetailsList handles updates to items and groups 4`] = ` >
@@ -1883,7 +1877,6 @@ exports[`DetailsList renders List correctly 1`] = ` >
@@ -2867,7 +2860,6 @@ exports[`DetailsList renders List correctly with onRenderDivider props 1`] = ` >
@@ -3948,7 +3940,6 @@ exports[`DetailsList renders List in compact mode correctly 1`] = ` >
@@ -4933,7 +4924,6 @@ exports[`DetailsList renders List in fixed constrained layout correctly 1`] = ` >
@@ -5917,7 +5907,6 @@ exports[`DetailsList renders List with custom icon as column divider 1`] = ` >
@@ -7012,7 +7001,6 @@ exports[`DetailsList renders List with hidden checkboxes correctly 1`] = ` >
@@ -8162,7 +8150,6 @@ exports[`DetailsList renders List with hidden checkboxes correctly 1`] = ` role="presentation" >