Skip to content

Commit

Permalink
Pass aria-describedby into RTE when sent via props (#4330)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmacknz authored Nov 22, 2023
1 parent 7e08cad commit 06cb427
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/great-months-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": patch
---

Pass aria-describedby into RTE when sent via props
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const RichTextEditor = ({
defaultValue,
labelText,
"aria-labelledby": labelledBy,
"aria-describedby": describedBy,
classNameOverride,
controls,
rows = 3,
Expand Down Expand Up @@ -144,7 +145,11 @@ export const RichTextEditor = ({
: ""
const descriptionAria = description ? `${editorId}-rte-description` : ""

const ariaDescribedBy = `${validationMessageAria} ${descriptionAria}`
const ariaDescribedBy = classnames(
validationMessageAria,
descriptionAria,
describedBy
)

return (
<>
Expand Down

0 comments on commit 06cb427

Please sign in to comment.