Skip to content

Commit 692e8af

Browse files
gergely-nagysapegin
authored andcommitted
Feat: Improve accessibility (styleguidist#893)
1 parent e3e2112 commit 692e8af

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

src/rsg-components/TableOfContents/TableOfContentsRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ export function TableOfContentsRenderer({ classes, children, searchTerm, onSearc
4343
value={searchTerm}
4444
className={classes.input}
4545
placeholder="Filter by name"
46+
aria-label="Filter by name"
4647
onChange={event => onSearchTermChange(event.target.value)}
4748
/>
4849
</div>
49-
{children}
50+
<nav>{children}</nav>
5051
</div>
5152
</div>
5253
);

src/rsg-components/TableOfContents/__snapshots__/TableOfContents.spec.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ exports[`renderer should render table of contents 1`] = `
55
<div>
66
<div>
77
<input
8+
aria-label="Filter by name"
89
onChange={[Function]}
910
placeholder="Filter by name"
1011
value="foo"
1112
/>
1213
</div>
14+
<nav />
1315
</div>
1416
</div>
1517
`;

src/rsg-components/ToolbarButton/ToolbarButtonRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ export function ToolbarButtonRenderer({
5454

5555
if (href !== undefined) {
5656
return (
57-
<a href={href} title={title} className={classNames}>
57+
<a href={href} title={title} className={classNames} aria-label={title}>
5858
{children}
5959
</a>
6060
);
6161
}
6262

6363
return (
64-
<button type="button" onClick={onClick} title={title} className={classNames}>
64+
<button type="button" onClick={onClick} title={title} className={classNames} aria-label={title}>
6565
{children}
6666
</button>
6767
);

src/rsg-components/ToolbarButton/__snapshots__/ToolbarButton.spec.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`should render a button 1`] = `
44
<button
5+
aria-label="Pizza button"
56
className="button"
67
onClick={[Function]}
78
title="Pizza button"
@@ -13,6 +14,7 @@ exports[`should render a button 1`] = `
1314

1415
exports[`should render a link 1`] = `
1516
<a
17+
aria-label="Pizza button"
1618
className="button"
1719
href="/foo"
1820
title="Pizza button"

src/styles/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const space = [
1111

1212
export const color = {
1313
base: '#333',
14-
light: '#999',
14+
light: '#767676',
1515
lightest: '#ccc',
1616
link: '#1978c8',
1717
linkHover: '#f28a25',

0 commit comments

Comments
 (0)