Skip to content

Commit

Permalink
General docs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
goodguyry committed Feb 12, 2024
1 parent 7a0734b commit a7a606c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A complete rewrite.
- Components track attributes they add and will only overwrite existing attribute values where required (#73)
- Components are now exported from their own endpoint (#84)
- MenuBar and MenuButton components are now deprecated (#75)
- Component state now uses setter/getter pattern (#83)
- Component state now uses a setter/getter pattern (#83)

**Changed**

Expand Down
7 changes: 4 additions & 3 deletions src/Dialog/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Dialog
======

Class for managing an interactive Dialog element.
Class for managing an interactive Dialog element, typically overlaid on inert
content, that traps focus and prevents interaction with the outside content.

## Contents

Expand Down Expand Up @@ -157,7 +158,7 @@ Additionally, the close button may not be the most appropriate element to focus

> When a dialog opens, focus moves to an element contained in the dialog. Generally, focus is initially set on the first focusable element. However, the most appropriate focus placement will depend on the nature and size of the content.
If the close button is not the most appropriate element to focus when the Dialog opens, we can omit the `closeButton` option to prevent the Dialog from managing focus. We can then manage focus and the close button ourselves.
If the close button is not the most appropriate element to focus when the Dialog opens, omit the `closeButton` option to prevent the Dialog from managing focus and manage focus and the close button manually.

```jsx
// Set up the close button.
Expand All @@ -174,7 +175,7 @@ dialog.on('dialog.stateChange', (event) => {

**DOM Mutations**

We can use `dialog.setInteractiveChildren()` to refresh the component after markup changes.
Use `dialog.setInteractiveChildren()` to refresh the component after markup changes.

## References

Expand Down
2 changes: 1 addition & 1 deletion src/Disclosure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Hides the target element with the `hidden` attribute, removing the need to do it

## Additional Information

The `loadOpen` option is removed, in part because it's possible to achieve the same result without the option: Add `aria-expanded="true"` to the controling element and `aria-hidden="false"` to the target element and the attribute will treat it as expanded by default.
Previously, there existsed a `loadOpen` option for initializing a Disclosure in the expanded state. To achieve the same result: Add `aria-expanded="true"` to the controling element and `aria-hidden="false"` to the target element.

## References

Expand Down
3 changes: 2 additions & 1 deletion src/Listbox/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Listbox
=======

Class for setting up an interactive Listbox element.
Class for setting up an interactive single-select Listbox for presenting a list
of options and allowing a user to select one of them.

## Contents

Expand Down
3 changes: 2 additions & 1 deletion src/Popup/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Popup
=====

Class for setting up an interactive popup button to activate a target element.
Class for setting up an interactive popup button to activate a target element
for displaying hidden content.

## Example

Expand Down
2 changes: 1 addition & 1 deletion src/shared/modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function DoSomethingHelpful({ instance }) {
}
```

The following properties are passed to modules:
An object with the following properties is passed to modules:

| Property | Type | Description |
|:------------|:-------------:|:--------------------------------------|
Expand Down

0 comments on commit a7a606c

Please sign in to comment.