Skip to content

Commit

Permalink
fix mdx paths
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Mar 28, 2024
1 parent 74ac6a7 commit 9b0ae9b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ui/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/stories/5. Components/Accordion/Accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as Accordion from './Accordion.stories';
- There are several articles cautioning against using `<details>`|`<summary>` for accordions. For example:
- [Scott O'Hara](https://www.scottohara.me//blog/2022/09/12/details-summary.html).
- [Dave Rupert](https://daverupert.com/2019/12/why-details-is-not-an-accordion/).
- An alternative approach is to use the [disclosure](/story/components-disclosure--disclosure) component.
- An alternative approach is to use the [disclosure](/story/components-disclosure-or-show-hide--disclosure) component.

<Canvas of={Accordion.Accordion} />

Expand Down
4 changes: 2 additions & 2 deletions ui/stories/5. Components/Navigation/Navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import * as Navigation from './Navigation.stories';
<Canvas of={Navigation.Navigation} />

## Hamburger (with simple navigation)
- Uses the [disclosure](/story/components-disclosure--disclosure) pattern to show/hide the navigation.
- Uses the [disclosure](/story/components-disclosure-or-show-hide--disclosure) pattern to show/hide the navigation.
- The `ESC` key and clicking outside the navigation both close the hamburger navigation.
- The disclosure button is placed **inside** the navigation region, allowing screen reader users who move to the `<nav>` using a shortcut to access the button directly.

<Canvas of={Navigation.HamburgerNavigation} />

## Disclosure navigation (with top-level links and dropdown menus)
- Uses the [disclosure](/story/components-disclosure--disclosure) pattern to show/hide the dropdowns via a `<button>` click, not CSS `:hover`.
- Uses the [disclosure](/story/components-disclosure-or-show-hide--disclosure) pattern to show/hide the dropdowns via a `<button>` click, not CSS `:hover`.
- The `ESC` key and clicking outside the dropdown both close the dropdown.
- See the [ARIA APG navigation pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation-hybrid/) and [Adrian Roselli's article](https://adrianroselli.com/2019/06/link-disclosure-widget-navigation.html) for more details.
- Also see this article that explains why [native HTML details/summary should not be used for navigation disclosure](https://melsumner.github.io/details-as-a-menu).
Expand Down
2 changes: 1 addition & 1 deletion ui/stories/5. Components/Share/Share.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as Share from './Share.stories';

# Share
- Uses the [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share).
- Fallback behaviour uses the [disclosure](/story/components-disclosure--disclosure) pattern, and allows user to copy the URL.
- Fallback behaviour uses the [disclosure](/story/components-disclosure-or-show-hide--disclosure) pattern, and allows user to copy the URL.

## TODO
- Replace fallback [document.execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) with [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as WebDisclosure from './WebDisclosure.stories';
<Meta of={WebDisclosure} />

# `<web-disclosure>`
- This is functionally equivalent to the [disclosure](/story/components-disclosure--disclosure) component, with the same accessibility considerations.
- This is functionally equivalent to the [disclosure](/story/components-disclosure-or-show-hide--disclosure) component, with the same accessibility considerations.
- The attributes that bind clicking the `ESC` key and clicking outside are renamed to `bind-escape-key` and `bind-click-outside`.
- To maintain the [DRY code](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) approach in this boilerplate, the JavaScript logic to handle showing/hiding of content is imported from an external shared utility function in `src/javascript/utils/disclosure.ts`.

Expand Down

0 comments on commit 9b0ae9b

Please sign in to comment.