Skip to content

Commit

Permalink
Add aria-hidden to InputLabel required asterisk (#1770)
Browse files Browse the repository at this point in the history
* add aria-hidden

* fix broken link

* add changeset

Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
  • Loading branch information
PeterYangIO and siddharthkp committed Jan 5, 2022
1 parent b604403 commit 39a3bc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-coats-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Adds aria-hidden="true" to InputLabel required asterisk
2 changes: 1 addition & 1 deletion docs/content/InputField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ componentId: inputField
title: InputField
status: Alpha
description: The InputField component is used to render a labelled text input and, optionally, associated validation text and hint text.
source: https://github.com/primer/react/blob/main/src/InputField.tsx
source: https://github.com/primer/react/blob/main/src/InputField/InputField.tsx
storybook: '/react/storybook?path=/story/forms-inputfield--text-input-field'
---

Expand Down
2 changes: 1 addition & 1 deletion src/_InputLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const InputLabel: React.FC<Props> = ({children, disabled, required, visuallyHidd
{required ? (
<Box display="flex" as="span">
<Box mr={1}>{children}</Box>
<span>*</span>
<span aria-hidden="true">*</span>
</Box>
) : (
children
Expand Down

0 comments on commit 39a3bc2

Please sign in to comment.