Skip to content

Commit 07060d0

Browse files
Merge pull request #46 from hackforla/2960-tdm-supporting-documentation
fix: added solution details
2 parents 09586d7 + ff8373c commit 07060d0

1 file changed

Lines changed: 54 additions & 30 deletions

File tree

docs/known-issues-and-solutions/solutions-index/alert-skipped-heading-level.md

Lines changed: 54 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
- Project Team Error guidance
99
- [X] Project Team Page Details
1010
- [X] Project Team Issue and PR details
11-
- [ ] Project Team Solution
11+
- [X] Project Team Solution
1212
- [x] Credits/Authors
1313

14-
## WAVE Error guidance
14+
## WAVE Alert guidance
1515

1616
WAVE Tool's Reference material on Skipped heading level may not specifically address your problem. We provide it here for optional reading.
1717

@@ -41,7 +41,11 @@ WAVE Tool's Reference material on Skipped heading level may not specifically add
4141
## Example of a DOM Snippet Generated From WAVE Tool
4242

4343
> ```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>
4549
> ```
4650
4751
## Project Team Error guidance
@@ -96,72 +100,92 @@ The following material covers how the Project Team has provided a solution to th
96100
- React Component(s)
97101
- [INSERT PATH: e.g. path/to/Component.jsx]
98102
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+
99119
### Project Team Solution
100120
101121
#### What is the specific problem that was occurring?
102122
<!-- 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`
104125
105126
#### What is the proposed solution to this problem?
106127
<!-- 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.`
108130
109131
#### Step-By-Step Guide
110132
<!-- Author Instructions: Replace details dropdown with N/A if this does not apply -->
111133
112-
??? Info "Click to see step-by-step guide"
113-
114-
[ADD DETAILED INSTRUCTIONS HERE]
134+
N/A
115135
116136
117137
#### Other Technical Details
118138
<!-- Author Instructions: Write N/A if this does not apply -->
119139
120-
??? Info "Click to see other technical details"
140+
N/A
121141
122-
[INSERT OTHER DETAILS e.g. Prop References, Return Value ]
123142
124143
#### 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
128145
129146
```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+
};]
131166
```
132167
133168
#### Why the Fix Works
134169
<!-- 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.
136171
137172
#### Where this solution is applicable
138173
<!-- 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.
142175
143176
#### Screenshots of WAVE Error
144177
145178
<!-- Author Instructions: when including markdown images, ensure they are responsive by specifying EITHER width OR height. Do not provide both. -->
146179
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" />
148182
149-
Description/text for image
150183
151-
[INSERT IMAGE HERE]
152184
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
160185
161-
[INSERT IMAGE HERE]
162186
163187
## Credits/Authors
164188
<!-- 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 -->
165189
- @experimentsinhonesty
166190
- @Rabia2219
167-
- [INCLUDE Contributor N]
191+
- @ColinBuyck

0 commit comments

Comments
 (0)