-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accessibility engineering review for Link component. (#3317)
* Remove as prop from Link. * Underline Link when inside of a paragraph tag, hover behavior should match focus behavior. * Create curly-otters-repeat.md * Soft deprecate as prop for Link so we don't break compatibility. * Fix issues with Link-dependent components when as prop is not accepted. * Remove ReactRouterLikeLink function from NavList tests. * Remove references to as prop from Link docs. * Update generated/components.json * Remove reference to as prop in ActionList.LinkItem docs. * Update generated/components.json * Add link variant to button to match PVC implementation. * Update generated/components.json * Allow up to 4 levels of nesting for the NavList (#3343) * allows up to 4 levels of nesting for the NavList * adds changeset * Update src/NavList/NavList.tsx Co-authored-by: Cole Bemis <colebemis@github.com> * updates snapshots --------- Co-authored-by: Cole Bemis <colebemis@github.com> * Refactor(ActionList): ActionList.Item should render content as a button if parent is not interactive. (#3284) * Using button as the underlying tag for ActionList.Item content. * Fix subnav layout. * Changing ActionList content to button if the top-level is not a button. ActionMenu is busted. * Fix issue where ActionList.Item content would render as a button inside ActionMenu, breaking keyboard navigation. * Create purple-crabs-matter.md * test(vrt): update snapshots * Fix bug with MenuContext not being exported properly. * Fix color violation in ActionList.Item. * Formatting, update snapshots. * test(vrt): update snapshots * Fix a11y violation in ActionList story. * Formatting. * Fix ts-ignore comment. * Adjust line-height when button is rendered. * Revert "test(vrt): update snapshots" This reverts commit ba6d863. * Revert "test(vrt): update snapshots" This reverts commit 31d5358. * Update snapshots. * Remove flexGrow from ActionList.Item to remove extra 1px vertical height. * Set padding to 0 and put flexGrow back to fix padding issue for ActionList buttons. * Fix ActionList text wrap story. * Fix underlinenav story by checking ActionList.Item if as prop is a. * Update snapshots and formatting. * Update snapshots. * If ActionList.Item content is rendered as a button, remove tabIndex from li and fix padding. * Fix various layout edge cases. * ts-ignore event handlers on ItemWrapper. * Update snapshots. * Revert fontWeight config that differed from production docs. * Pass selectionVariant prop illegally in UnderlineNav story to fix issue with Selection spans showing up. * fix: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`'s `onSelect` handler by @gr2m (#3346) * fix: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`'s `onSelect` handler (#3163) * test: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`'s `onSelect` handler Failing test for #3162 * fix: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`ߴs `onSelect` handler * add storybook example: Delayed Menu Close * update docs * docs: changeset * Update changelog --------- Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com> * Update generated/components.json --------- Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com> * Check for tabIndex value in isTopLevelInteractive. * Reference styles in updated menuProps. * Updated snapshots. * Fix padding setting instead of using values from styles, which are inverted. * Update snapshots. --------- Co-authored-by: radglob <radglob@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com> * Rollback attempt at underlying links inside other bits of text. * Update src/Button/styles.ts Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com> --------- Co-authored-by: radglob <radglob@users.noreply.github.com> Co-authored-by: Mike Perrotti <mperrotti@github.com> Co-authored-by: Cole Bemis <colebemis@github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com> Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
- Loading branch information
1 parent
44ccc90
commit cc235fd
Showing
18 changed files
with
97 additions
and
320 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,6 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Link components no longer accept an `as` prop. If you need link-like styling, you should use a different component and style accordingly. | ||
Button has a `link` variant which can be used for this purpose. |
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
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
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
Oops, something went wrong.