Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added ARIA: Searchbox #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

- **RadioAria** - Add `role='radio'` to a checkable interactive control. Use radio in place of checkbox if only one item in a group can be checked. Add `aria-checked` to indicate the state of the checkbox.

- **SearchAria** - Add `role='search'` The role “searchbox” was added to represent the same element type as an HTML input element that includes type=”search”..

- **SliderAria** - Add `role='slider'` to allow users to select from a certain range. Add `aria-orientation` to indicate what direction the slider is oriented in. Add `aria-valuemin` to indicate the minimum value. Add `aria-valuemax` to indicate the maximum value. Add `aria-valuenow` to indicate the current value. If the value is not represented by a number add `aria-valuetext` in place of aria-valuenow.

- **SwitchAria** - Use `role='switch'` on checkboxes that represent an 'on' or 'off' state. Add `aria-checked` to indicate whether component is on or off. Add `aria-required` if the field is required.
Expand Down
12 changes: 11 additions & 1 deletion snippets/react-snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
],
"description": "Adds aria attributes for a dialog. A dialog is a window separate from the rest of the webpage like a modal."
},
"SearchAria":{
"prefix": [
"SearchAria",
],
"body": [
"role='search'",
himanshu007-creator marked this conversation as resolved.
Show resolved Hide resolved
"role='searchbox'",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry! I meant as a separate Snippet

SearchAria is perfect but also "SearchboxAria"

for SearchBox i would consider also looking at ComboxboxAria -> combox is a an input as well so they might have similar aria attributes

],
"description":"Add `role='search'` to represent the same element type as an HTML input element that includes type=”search”."
},
"AlertAria": {
"prefix": [
"AlertAria",
Expand Down Expand Up @@ -182,4 +192,4 @@
],
"description": "Use `role='switch'` on checkboxes that represent an 'on' or 'off' state. Add `aria-checked` to indicate whether component is on or off. Add `aria-required` if the field is required."
}
}
}