Skip to content

Commit

Permalink
Remove enableAccessibleFieldDOMStructure prop when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Sep 17, 2024
1 parent 7b1784d commit 931a1a1
Show file tree
Hide file tree
Showing 47 changed files with 104 additions and 289 deletions.
10 changes: 2 additions & 8 deletions docs/data/date-pickers/custom-field/MaterialV7FieldWrapped.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ export default function MaterialV7FieldWrapped() {
return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer components={['DateField', 'DatePicker']}>
<DateField
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DatePicker
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DateField slots={{ textField: MyPickersTextField }} />
<DatePicker slots={{ textField: MyPickersTextField }} />
</DemoContainer>
</LocalizationProvider>
);
Expand Down
10 changes: 2 additions & 8 deletions docs/data/date-pickers/custom-field/MaterialV7FieldWrapped.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ export default function MaterialV7FieldWrapped() {
return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer components={['DateField', 'DatePicker']}>
<DateField
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DatePicker
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DateField slots={{ textField: MyPickersTextField }} />
<DatePicker slots={{ textField: MyPickersTextField }} />
</DemoContainer>
</LocalizationProvider>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
<DateField
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DatePicker
enableAccessibleFieldDOMStructure
slots={{ textField: MyPickersTextField }}
/>
<DateField slots={{ textField: MyPickersTextField }} />
<DatePicker slots={{ textField: MyPickersTextField }} />
2 changes: 1 addition & 1 deletion docs/data/date-pickers/fields/BasicV7DOMStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function BasicV7DOMStructure() {
return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer components={['DateField']}>
<DateField label="Date Field" enableAccessibleFieldDOMStructure />
<DateField label="Date Field" />
</DemoContainer>
</LocalizationProvider>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/fields/BasicV7DOMStructure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function BasicV7DOMStructure() {
return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer components={['DateField']}>
<DateField label="Date Field" enableAccessibleFieldDOMStructure />
<DateField label="Date Field" />
</DemoContainer>
</LocalizationProvider>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<DateField label="Date Field" enableAccessibleFieldDOMStructure />
<DateField label="Date Field"/>
10 changes: 5 additions & 5 deletions docs/data/migration/migration-pickers-v7/migration-pickers-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ the field consumes some props (e.g: `shouldRespectLeadingZeros`) and forwards th
```js
<DatePicker
slotProps={{ field: { shouldRespectLeadingZeros: true } }}
enableAccessibleFieldDOMStructure
/>
enableAccessibleFieldDOMStructure={false}
/>
<DatePicker
slotProps={{ field: { shouldRespectLeadingZeros: true } }}
/>
Expand All @@ -106,8 +106,8 @@ the field consumes some props (e.g: `shouldRespectLeadingZeros`) and forwards th
```js
<DatePicker
slotProps={{ field: { size: 'small' } }}
enableAccessibleFieldDOMStructure
/>
enableAccessibleFieldDOMStructure={false}
/>
<DatePicker
slotProps={{ field: { size: 'small' } }}
/>
Expand All @@ -123,7 +123,7 @@ Both components below will render a small size UI:
```js
<DatePicker
slotProps={{ textField: { size: 'small' } }}
enableAccessibleFieldDOMStructure
enableAccessibleFieldDOMStructure={false}
/>
<DatePicker
slotProps={{ textField: { size: 'small' } }}
Expand Down
1 change: 0 additions & 1 deletion docs/src/modules/components/overview/Keyboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ export default function Keyboard() {
onKeyUp={() => {
setSelectedKey(null);
}}
enableAccessibleFieldDOMStructure
onSelectedSectionsChange={(newSelectedSection) => {
selectedSection.current = newSelectedSection;
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('<DateRangePicker />', () => {
const originalMatchMedia = window.matchMedia;
window.matchMedia = stubMatchMedia(false);

render(<DateRangePicker enableAccessibleFieldDOMStructure />);
render(<DateRangePicker />);
fireEvent.click(getFieldInputRoot());
clock.runToLast();

Expand Down
Loading

0 comments on commit 931a1a1

Please sign in to comment.