|
8 | 8 | - Project Team Error guidance |
9 | 9 | - [X] Project Team Page Details |
10 | 10 | - [X] Project Team Issue and PR details |
11 | | - - [ ] Project Team Solution |
| 11 | + - [X] Project Team Solution |
12 | 12 | - [x] Credits/Authors |
13 | 13 |
|
14 | | -## WAVE Error guidance |
| 14 | +## WAVE Alert guidance |
15 | 15 |
|
16 | 16 | WAVE Tool's Reference material on Skipped heading level may not specifically address your problem. We provide it here for optional reading. |
17 | 17 |
|
@@ -41,7 +41,11 @@ WAVE Tool's Reference material on Skipped heading level may not specifically add |
41 | 41 | ## Example of a DOM Snippet Generated From WAVE Tool |
42 | 42 |
|
43 | 43 | > ```html |
44 | | -> [HTML snippet showing the problematic code structure that WAVE detected] |
| 44 | +> <h1 class="heading1-0-1-23">About the TDM Calculator</h1> |
| 45 | +> <div> |
| 46 | +> <h3 class="subheading-0-1-28">What does TDM mean?</h3> |
| 47 | +> ... |
| 48 | +> </div> |
45 | 49 | > ``` |
46 | 50 |
|
47 | 51 | ## Project Team Error guidance |
@@ -96,72 +100,92 @@ The following material covers how the Project Team has provided a solution to th |
96 | 100 | - React Component(s) |
97 | 101 | - [INSERT PATH: e.g. path/to/Component.jsx] |
98 | 102 |
|
| 103 | +### Project Page Details 4 |
| 104 | +- Project Page name: About Page |
| 105 | +- Project Dev URL: https://tdm-dev.azurewebsites.net/about |
| 106 | +- Requires sign in: FALSE |
| 107 | + - Required User Role: All Users |
| 108 | + - Can access page directly from URL: TRUE |
| 109 | + - Accepts URL parameters: FALSE |
| 110 | +
|
| 111 | +### Project Team Issue and PR details 4 |
| 112 | +- Related GitHub Issue(s): |
| 113 | + - https://github.com/hackforla/tdm-calculator/issues/2960 |
| 114 | +- Related Pull Request(s): |
| 115 | + - https://github.com/hackforla/tdm-calculator/pull/3033 |
| 116 | +- React Component(s) |
| 117 | + - client/src/components/About/DefaultView.jsx |
| 118 | +
|
99 | 119 | ### Project Team Solution |
100 | 120 |
|
101 | 121 | #### What is the specific problem that was occurring? |
102 | 122 | <!-- Author Instructions: Add a detailed explanation of the specific accessibility problem, including context about when/where it occurs, what elements are involved, and why it's problematic for assistive technology users --> |
103 | | -[INSERT CONTENT] |
| 123 | +
|
| 124 | +The issues above were caused by a skip in sequential heading level within a page's html. For example, if a page had a `<h1>` and `<h3>`, but no `<h2>`. This is problematic for assistive technology users because heading levels serve as a table of contents for understanding the structure of information on a web page. When a heading level is skipped, a user may assume there is missing information or that there are no further heading levels to explore when they encounter a heading level with no content. It is a major break in expected behavior and is disruptive for a user's ability to understand a page quickly` |
104 | 125 |
|
105 | 126 | #### What is the proposed solution to this problem? |
106 | 127 | <!-- Author Instructions: Add a few sentences describing the fix. "Why the Fix Works" comes later (see below). If there are lots of instructions required to explain the solution, include them in Developer Resources below --> |
107 | | -[INSERT CONTENT] |
| 128 | +
|
| 129 | +This can be resolved by updated the heading levels so that no levels are skipped. In the example provided above, the `<h3>` heading should be updated to `<h2>`. In addition, we should double check that this update does not create a new skipped heading level for the rest of the page and if so, update accordingly.` |
108 | 130 |
|
109 | 131 | #### Step-By-Step Guide |
110 | 132 | <!-- Author Instructions: Replace details dropdown with N/A if this does not apply --> |
111 | 133 |
|
112 | | -??? Info "Click to see step-by-step guide" |
113 | | -
|
114 | | - [ADD DETAILED INSTRUCTIONS HERE] |
| 134 | +N/A |
115 | 135 |
|
116 | 136 |
|
117 | 137 | #### Other Technical Details |
118 | 138 | <!-- Author Instructions: Write N/A if this does not apply --> |
119 | 139 |
|
120 | | -??? Info "Click to see other technical details" |
| 140 | +N/A |
121 | 141 |
|
122 | | - [INSERT OTHER DETAILS e.g. Prop References, Return Value ] |
123 | 142 |
|
124 | 143 | #### Code Snippet With Solution |
125 | | -??? Info "Click to see code snippets" |
126 | | -
|
127 | | - [INSERT PATH file/path/to/Snippet.jsx] |
| 144 | + client/src/components/About/DefaultView.jsx |
128 | 145 |
|
129 | 146 | ```jsx |
130 | | - [Code example showing the fix/solution] |
| 147 | + [const DefaultView = ({ aboutList }) => { |
| 148 | + const classes = useStyles(); |
| 149 | + if (!aboutList || aboutList?.length === 0) { |
| 150 | + return null; |
| 151 | + } |
| 152 | + return ( |
| 153 | + <> |
| 154 | + {aboutList.map(about => ( |
| 155 | + <div key={about.id}> |
| 156 | + <h2 className={classes.subheading}>{about.title}</h2> |
| 157 | + <Interweave |
| 158 | + transform={TransformExternalLink} |
| 159 | + content={about.content} |
| 160 | + /> |
| 161 | + </div> |
| 162 | + ))} |
| 163 | + </> |
| 164 | + ); |
| 165 | + };] |
131 | 166 | ``` |
132 | 167 |
|
133 | 168 | #### Why the Fix Works |
134 | 169 | <!-- Author Instruction: Add an explanation of how the code changes resolve the accessibility issue and why this approach was chosen --> |
135 | | -[INSERT CONTENT] |
| 170 | +- This fix because it removes the gap in sequential heading levels within a single page. |
136 | 171 |
|
137 | 172 | #### Where this solution is applicable |
138 | 173 | <!-- Author Instruction: Add a bullet point list of scenarios that might trigger this error and would be fixed by applying the provided solution, e.g. particular groupings of html elements, user interactivity, code-specific edge cases --> |
139 | | -- [INSERT SCENARIO 1] |
140 | | -- [INSERT SCENARIO 2] |
141 | | -- [INSERT SCENARIO N] |
| 174 | +- Any page of the website since all pages should have an h1 and then require sequential heading levels for any subheadings. |
142 | 175 |
|
143 | 176 | #### Screenshots of WAVE Error |
144 | 177 |
|
145 | 178 | <!-- Author Instructions: when including markdown images, ensure they are responsive by specifying EITHER width OR height. Do not provide both. --> |
146 | 179 |
|
147 | | -??? Info "1. Descriptive Title for Screenshot Set 1" |
| 180 | +??? Info 1. WAVE tool showing skipped heading level error" |
| 181 | + <img width="1259" alt="WAVE tool showing skipped heading level error" src="https://github.com/user-attachments/assets/ccf86006-9a22-4b17-a49b-95c253df37b3" /> |
148 | 182 |
|
149 | | - Description/text for image |
150 | 183 |
|
151 | | - [INSERT IMAGE HERE] |
152 | 184 | |
153 | | - Description/text for image |
154 | | -
|
155 | | - [INSERT IMAGE HERE] |
156 | | -
|
157 | | -??? Info "1. Descriptive Title for Screenshot Set 2" |
158 | | -
|
159 | | - Descriptoin/text for image |
160 | 185 |
|
161 | | - [INSERT IMAGE HERE] |
162 | 186 |
|
163 | 187 | ## Credits/Authors |
164 | 188 | <!-- Author Instructions: Add bullet points with GitHub handles of all HfLA members who contributed to this wiki page and/or contributed to Pull Requests that provided solutions for this page --> |
165 | 189 | - @experimentsinhonesty |
166 | 190 | - @Rabia2219 |
167 | | -- [INCLUDE Contributor N] |
| 191 | +- @ColinBuyck |
0 commit comments