Skip to content

Commit 301a0fc

Browse files
jennurzzacharo
authored andcommitted
responsive sidebar: add aria-label prop
1 parent c498cbe commit 301a0fc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/lib/elements/GridResponsiveSidebarColumn.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@ export class GridResponsiveSidebarColumn extends React.Component {
1515
open,
1616
onHideClick,
1717
children,
18+
ariaLabel,
1819
} = this.props;
1920

2021
return (
2122
<>
22-
<Grid.Column mobile={mobile} tablet={tablet} width={width} only="mobile tablet">
23+
<Grid.Column
24+
as="aside"
25+
aria-label={ariaLabel}
26+
mobile={mobile}
27+
tablet={tablet}
28+
width={width}
29+
only="mobile tablet"
30+
>
2331
<Sidebar
2432
as={Segment}
2533
animation="overlay"
@@ -44,6 +52,8 @@ export class GridResponsiveSidebarColumn extends React.Component {
4452
</Grid.Column>
4553

4654
<Grid.Column
55+
as="aside"
56+
aria-label={ariaLabel}
4757
width={width}
4858
only="computer"
4959
computer={computer}
@@ -67,6 +77,7 @@ GridResponsiveSidebarColumn.propTypes = {
6777
computer: PropTypes.number,
6878
largeScreen: PropTypes.number,
6979
widescreen: PropTypes.number,
80+
ariaLabel: PropTypes.string,
7081
};
7182

7283
GridResponsiveSidebarColumn.defaultProps = {
@@ -76,4 +87,5 @@ GridResponsiveSidebarColumn.defaultProps = {
7687
computer: undefined,
7788
widescreen: undefined,
7889
largeScreen: undefined,
90+
ariaLabel: undefined,
7991
};

0 commit comments

Comments
 (0)