@@ -39,11 +39,11 @@ Click to see the WAVE Tool's Reference material on Broken ARIA reference. These
3939
4040## Example of a DOM Snippet Generated From WAVE Tool
4141
42- ``` html
43- <span aria-describedby =" popup-1" style =" cursor : pointer ;" >
44- <a id =" cy-login-menu-item" class =" link-0-1-13 lastItem-0-1-18" href =" /login" >Login</a >
45- </span >
46- ```
42+ > ``` html
43+ > <span aria-describedby =" popup-1" style =" cursor : pointer ;" >
44+ > <a id =" cy-login-menu-item" class =" link-0-1-13 lastItem-0-1-18" href =" /login" >Login</a >
45+ > </span >
46+ > ```
4747## Project Team Error guidance
4848
4949The following material covers how the TDM team has provided a solution to the Broken Aria reference WAVE error.
@@ -53,13 +53,14 @@ The following material covers how the TDM team has provided a solution to the Br
5353- TDM Staging URL: N/A
5454- Required User Role: ALL
5555### Project Team Issue and PR details
56- - Related GitHub Issue(s):
57- - https://github.com/hackforla/tdm-calculator/issues/2531
58- - Related Pull Request(s):
59- - https://github.com/hackforla/tdm-calculator/pull/2786
60- - follow-up commit: https://github.com/hackforla/tdm-calculator/commit/16072c43a7aa7d18656d133c302190d5a1e53ee9
61- - React Component(s)
62- - ` client/src/components/Layout/NavBarLogin.jsx `
56+ #### Related GitHub Issue, PR and React Component 1
57+ - Related GitHub Issue 1:
58+ - https://github.com/hackforla/tdm-calculator/issues/2531
59+ - Related Pull Request:
60+ - https://github.com/hackforla/tdm-calculator/pull/2786
61+ - follow-up commit: https://github.com/hackforla/tdm-calculator/commit/16072c43a7aa7d18656d133c302190d5a1e53ee9
62+ - React Component:
63+ - `client/src/components/Layout/NavBarLogin.jsx`
6364
6465### Project Team Solution
6566
@@ -80,8 +81,7 @@ This hook-based approach exists specifically because `reactjs-popup` may clone t
8081#### Step-By-Step Guide
8182<!-- Author Instructions: Replace details dropdown with N/A if this does not apply -->
8283
83- <details ><summary >Click to see step-by-step guide</summary >
84- <p >
84+ ??? Info "Click to see step-by-step guide"
8585
8686## Option A: Component-specific fix (simple + local)
8787
@@ -135,27 +135,20 @@ Include in `deps` anything that could change whether:
135135- the element id changes
136136- the popup structure changes
137137
138- </p >
139- </details >
140-
141138#### Other Technical Details
142139<!-- Author Instructions: Write N/A if this does not apply -->
143140
144- <details ><summary >Click to see other technical details</summary >
145- <p >
141+ ??? Info "Click to see other technical details"
146142
147143- ` reactjs-popup ` clones the trigger element and strips any attributes, which can prevent setting ARIA attributes or refs directly on the trigger.
148144- Ad-hoc DOM manipulation can be subject to timing/race issues if you do it in many components.
149145- A hook centralizes the workaround so components don’t each reinvent their own “removeAttribute” logic.
150146
151147Reference (discussion): https://github.com/hackforla/tdm-calculator/issues/2410#issuecomment-3561030939
152148
153- </p >
154- </details >
155-
156149
157150#### Code Snippet With Solution
158- < details >< summary > Click to see code snippets...</ summary >
151+ ??? Info " Click to see code snippets"
159152
160153Component: ` NavBarLogin.jsx `
161154
@@ -215,8 +208,6 @@ function MyComponent({ project }) {
215208}
216209` ` `
217210
218- </details>
219-
220211#### Why the Fix Works
221212By deleting (or replacing) the ` aria- describedby` attribute when the modal is closed or when the trigger is rendered, assistive tech will no longer associate the trigger with a non-existent tooltip/popup element. This prevents the “broken ARIA reference” error and avoids confusing behavior in screen readers.
222213
0 commit comments