Skip to content

Commit 0dae6d6

Browse files
fix(accessibility): Replace aria-hidden wt hidden (#5188)
* fix(accessibility): Replace aria-hidden wt hidden * review comments addressed * updated release notes. * release notes text updated --------- Co-authored-by: Manjunath Kalburgi <[email protected]>
1 parent 10a7a45 commit 0dae6d6

File tree

14 files changed

+29
-11
lines changed

14 files changed

+29
-11
lines changed

ui/components/activity-timeline/RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
# Activity Timeline Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.22.0
7+
### Changed
8+
- Replaced aria-hidden with hidden attribute for components that show/hide content
69

710
<!-- ## [VERSION] -->

ui/components/activity-timeline/base/example.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export const DescriptionCard = props => (
223223
props.className
224224
)}
225225
id={props.id}
226-
aria-hidden={!props.isExpanded}
226+
hidden={!props.isExpanded}
227227
>
228228
{props.fields && <FieldInfoList {...props} />}
229229
{props.children && (

ui/components/activity-timeline/docs.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Text describing the type of timeline item is placed in a `span`. It is the first
3030

3131
**Section:**
3232

33-
- `aria-hidden` indicates if the details section is open or closed, and if set to `true`, assistive technology hides the details section.
33+
- `hidden` indicates if the details section is open or closed, and if set to `true`, assistive technology hides the details section.
3434

3535
#### Keyboard Interactions
3636

@@ -46,10 +46,10 @@ Text describing the type of timeline item is placed in a `span`. It is the first
4646

4747
<Blockquote type="a11y" header="Accessibility Note">
4848
<p>
49-
When the user interacts with the button to open the details section, <code>aria-expanded</code> on the button should be <code>true</code> and <code>aria-hidden</code> on the details section should be <code>false</code>.
49+
When the user interacts with the button to open the details section, <code>aria-expanded</code> on the button should be <code>true</code> and <code>hidden</code> on the details section should be <code>false</code>.
5050
</p>
5151
<p>
52-
When the user interacts with the button to close the details section, <code>aria-expanded</code> on the button should be <code>false</code> and <code>aria-hidden</code> on the details section should be <code>true</code>.
52+
When the user interacts with the button to close the details section, <code>aria-expanded</code> on the button should be <code>false</code> and <code>hidden</code> on the details section should be <code>true</code>.
5353
</p>
5454
</Blockquote>
5555

ui/components/carousel/RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Carousel Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.22.0
7+
### Changed
8+
- Replaced aria-hidden with hidden attribute for components that show/hide content
69

710
## 2.7.0
811

ui/components/carousel/docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A Carousel is built using a tabbed UI specification and requires the following t
3030
- Selected tab’s anchor has `tabindex="0"`, all other tabs have `tabindex="-1"`
3131
- Each tab’s anchor has an `aria-controls` attribute whose value is the id of the associated `<div role="tabpanel">`
3232
- Each tab panel has an `aria-labelledby` attribute whose value is the id of its associated `<a role="tab">`
33-
- Each tab panel has an `aria-hidden` attribute whose value is toggled based on which panel is visible
33+
- Each tab panel has an `hidden` attribute whose value is toggled based on which panel is visible
3434
- When the Carousel is set to auto-play, the HTML for the pause button is required to precede the HTML of the tab set
3535

3636
#### Keyboard Interactions

ui/components/carousel/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const CarouselPanel = props => (
3939
id={props.id}
4040
className={classNames('slds-carousel__panel', props.className)}
4141
role="tabpanel"
42-
aria-hidden={props.isActive ? 'false' : 'true'}
42+
hidden={!props.isActive}
4343
aria-labelledby={props.indicatorId}
4444
>
4545
<a
@@ -96,7 +96,7 @@ class Carousel extends Component {
9696
<div
9797
className="slds-carousel__panels"
9898
style={{
99-
transform: `translateX(-${(this.props.panelActive - 1) * 100}%)`
99+
transform: `translateX(-${(this.props.panelActive - 3) * 100}%)`
100100
}}
101101
>
102102
<CarouselPanel

ui/components/expandable-section/RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Expandable Section Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.22.0
7+
### Changed
8+
- Replaced aria-hidden with hidden attribute for components that show/hide content
69

710
## 2.15.0
811

ui/components/expandable-section/base/example.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export let Section = props => (
2222

2323
export let SectionContent = props => (
2424
<div
25-
aria-hidden={props.isOpen ? 'false' : 'true'}
25+
hidden={props.isOpen ? 'false' : 'true'}
2626
className={classNames('slds-section__content', props.className)}
2727
id={props.referenceId}
2828
>

ui/components/panels/RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Panels Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.22.0
7+
### Changed
8+
- Replaced aria-hidden with hidden attribute for components that show/hide content
69

710
## 2.15.7
811

ui/components/panels/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Container = props => {
2121
props.drawer && 'slds-panel_drawer',
2222
props.isVisible ? 'slds-is-open' : 'slds-hidden'
2323
)}
24-
aria-hidden={!props.isVisible}
24+
hidden={!props.isVisible}
2525
id={props.id}
2626
>
2727
{props.children}

0 commit comments

Comments
 (0)