-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A11y revamp: Pharos buttons (non-breaking change) (#628)
* docs: add @sirrah-tam as a contributor * feat(button): add a11y naming convention for aria * feat(button): add aria-description support * chore: add changset * Update packages/pharos/src/components/button/pharos-button.ts Co-authored-by: Dane Hillard <[email protected]> * Update packages/pharos/src/components/button/pharos-button.ts Co-authored-by: Dane Hillard <[email protected]> * feat(button): move property deprecated flag * fix(button): remove ts-ignore after lit upgrade * feat(button): add a11y state typing * fix: add TODO for future reference Co-authored-by: Dane Hillard <[email protected]> * fix(a11y attributes): update AriaHiddenState name --------- Co-authored-by: Dane Hillard <[email protected]>
- Loading branch information
1 parent
3ad3fd6
commit 9ef1e18
Showing
6 changed files
with
88 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ithaka/pharos': minor | ||
--- | ||
|
||
Update PharosButton to use a11y naming convention and include wider ARIA support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export {}; | ||
|
||
declare global { | ||
type AriaHiddenState = 'false' | 'true' | 'undefined' | undefined; | ||
type AriaPressedState = 'false' | 'true' | 'mixed' | 'undefined' | undefined; | ||
type AriaExpandedState = 'false' | 'true' | 'undefined' | undefined; | ||
type AriaDisabledState = 'false' | 'true' | undefined; | ||
type AriaPopupState = | ||
| 'false' | ||
| 'true' | ||
| 'menu' | ||
| 'tree' | ||
| 'grid' | ||
| 'listbox' | ||
| 'dialog' | ||
| undefined; | ||
} |