-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): Make
<Text>
and <Headline>
accessible by allowi…
…ng ARIA labelling props (#4194) * feat(components): Make `<Text>` and `<Headline>` accessible by allowing ARIA labelling props * Create wet-parents-burn.md
- Loading branch information
Showing
5 changed files
with
46 additions
and
2 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,8 @@ | ||
--- | ||
"@marigold/components": minor | ||
"@marigold/types": minor | ||
--- | ||
|
||
feat(components): Make `<Text>` and `<Headline>` accessible by allowing ARIA labelling props | ||
|
||
`<Text>` and `<Headline>` will no longer cause type errors when ARIA labelling is used (`aria-label`, `id`, ...). |
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,32 @@ | ||
/** | ||
* Properties that are required on elements to enable good accessibility. Make sure | ||
* all components allow these attributes. | ||
* | ||
* Copy/pasted from `@react-types/shared` and added the `id` prop to it. | ||
*/ | ||
export interface AriaLabelingProps { | ||
/** | ||
* The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). | ||
*/ | ||
id?: string; | ||
|
||
/** | ||
* Defines a string value that labels the current element. | ||
*/ | ||
'aria-label'?: string; | ||
|
||
/** | ||
* Identifies the element (or elements) that labels the current element. | ||
*/ | ||
'aria-labelledby'?: string; | ||
|
||
/** | ||
* Identifies the element (or elements) that describes the object. | ||
*/ | ||
'aria-describedby'?: string; | ||
|
||
/** | ||
* Identifies the element (or elements) that provide a detailed, extended description for the object. | ||
*/ | ||
'aria-details'?: string; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from 'type-fest'; | ||
export * from './html'; | ||
export * from './react'; | ||
|
||
/** | ||
|