diff --git a/.changeset/pink-beds-fetch.md b/.changeset/pink-beds-fetch.md deleted file mode 100644 index 5400fd391fa..00000000000 --- a/.changeset/pink-beds-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@primer/react': patch ---- - -Remove `aria-hidden=true` from `span`s with required asterisk diff --git a/src/__tests__/deprecated/InputField.test.tsx b/src/__tests__/deprecated/InputField.test.tsx index 5a6fcae7cef..71e8d6c0273 100644 --- a/src/__tests__/deprecated/InputField.test.tsx +++ b/src/__tests__/deprecated/InputField.test.tsx @@ -6,7 +6,6 @@ import InputField from '../../deprecated/InputField' expect.extend(toHaveNoViolations) const TEXTINPUTFIELD_LABEL_TEXT = 'Name' -const TEXTINPUTFIELD_LABEL_TEXT_WITH_ASTERISK = 'Name *' const TEXTINPUTFIELD_CAPTION_TEXT = 'Hint: your first name' const TEXTINPUTFIELD_SUCCESS_TEXT = 'This name is valid' const TEXTINPUTFIELD_ERROR_TEXT = 'This name is invalid' @@ -67,7 +66,7 @@ describe('InputField', () => { , ) - const input = getByRole('textbox', {name: TEXTINPUTFIELD_LABEL_TEXT_WITH_ASTERISK}) + const input = getByRole('textbox', {name: TEXTINPUTFIELD_LABEL_TEXT}) expect(input.getAttribute('required')).not.toBeNull() }) diff --git a/src/internal/components/InputLabel.tsx b/src/internal/components/InputLabel.tsx index 1117c0f79bf..2b26755bb3c 100644 --- a/src/internal/components/InputLabel.tsx +++ b/src/internal/components/InputLabel.tsx @@ -55,7 +55,7 @@ const InputLabel: React.FC> = ({ {required ? ( {children} - * + ) : ( children