Skip to content

Commit

Permalink
refactor: overwrite star for screenreader output (#3065)
Browse files Browse the repository at this point in the history
* refactor: updated snapshot

* feat: alternative text empty for the asterisk

* refactor: updated snapshot

---------

Co-authored-by: brunoschadeck <[email protected]>
  • Loading branch information
mfranzke and bruno-sch authored Aug 19, 2024
1 parent b506452 commit 123e46e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/components/src/styles/_form-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ $input-valid-types: "color", "date", "datetime-local", "email", "file", "hidden"
label {
&::after {
content: "*";
// Hiding asterisk from screenreaders, https://www.w3.org/TR/css-content-3/#alt
content: "*" / "";
padding-inline-start: variables.$db-spacing-fixed-2xs;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["Label star, edit, required, Required, blank","T. e. s. t. TODO: Add a valid Message","Test selected","blank. Please fill out this field.. unselected","T. e. s. t. TODO: Add a valid Message"]
["Label, edit, required, Required, blank","T. e. s. t. TODO: Add a valid Message","Test selected","blank. Please fill out this field.. unselected","T. e. s. t. TODO: Add a valid Message"]

0 comments on commit 123e46e

Please sign in to comment.