Skip to content

Commit

Permalink
fix: change aria-label on link and add missing aria-current
Browse files Browse the repository at this point in the history
Best practive is to start the accessible name of a link with the visual text. The dot in het text is redundant, better use a comma for a short pauze.

The aria-current was missing on the link for the story “Link rondom image, current page”.
  • Loading branch information
rianrietveld committed Jan 9, 2025
1 parent c40b215 commit 6a5ff03
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/storybook-test/stories/link/link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export const Current: Story = {
export const inlineBox: Story = {
name: 'Link rondom image',
args: {
'aria-label': 'homepage · NL Design System',
'aria-label': 'NL Design System logo, naar de voorpagina',
children: <ExampleImage />,
href: 'https://nldesignsystem.nl/',
inlineBox: true,
Expand All @@ -364,7 +364,7 @@ export const inlineBox: Story = {
export const inlineBoxHover: Story = {
name: 'Link rondom image met :hover',
args: {
'aria-label': 'homepage · NL Design System',
'aria-label': 'NL Design System logo, naar de voorpagina',
children: <ExampleImage />,
className: 'nl-link--hover',
href: 'https://nldesignsystem.nl/',
Expand All @@ -389,7 +389,8 @@ export const inlineBoxHover: Story = {
export const inlineBoxCurrent: Story = {
name: 'Link rondom image, current page',
args: {
'aria-label': 'homepage · NL Design System',
'aria-current': 'true',
'aria-label': 'NL Design System logo, naar de voorpagina',
children: <ExampleImage />,
href: 'https://nldesignsystem.nl/',
inlineBox: true,
Expand Down

0 comments on commit 6a5ff03

Please sign in to comment.