Skip to content

Commit 880f7e6

Browse files
authored
Merge pull request #59 from hackforla/3042-document-alert-layout-table
update Alert - Layout table page
2 parents 2ce40b4 + 26ac3af commit 880f7e6

1 file changed

Lines changed: 56 additions & 29 deletions

File tree

docs/known-issues-and-solutions/solutions-index/alert-layout-table.md

Lines changed: 56 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
## Page Content Status
77
- [X] WAVE Error guidance text
8-
- [ ] Example of a DOM Snippet Generated From WAVE Tool
8+
- [X] Example of a DOM Snippet Generated From WAVE Tool
99
- Project Team Error guidance
10-
- [ ] Project Team Page Details
11-
- [ ] Project Team Issue and PR details
12-
- [ ] Project Team Solution
13-
- [ ] Credits/Authors
10+
- [X] Project Team Page Details
11+
- [X] Project Team Issue and PR details
12+
- [X] Project Team Solution
13+
- [X] Credits/Authors
1414

1515
## WAVE Error guidance
1616

@@ -42,7 +42,21 @@ WAVE Tool's Reference material on Layout table may not specifically address your
4242
## Example of a DOM Snippet Generated From WAVE Tool
4343

4444
> ```html
45-
> [HTML snippet showing the problematic code structure that WAVE detected]
45+
> <table class="table-0-2-25">
46+
> <thead class="thead-0-2-28">
47+
> <tr class="tr-0-2-26">
48+
> <td class="td-0-2-27">Name</td>
49+
> <td class="td-0-2-27">Address</td>
50+
> <td class="td-0-2-27">Created By</td>
51+
> <td class="td-0-2-27">Created On</td>
52+
> <td class="td-0-2-27">Last Saved</td>
53+
> <td class="td-0-2-27">Archive Date</td>
54+
> </tr>
55+
> </thead>
56+
> <tbody class="tbody-0-2-29">
57+
> <!-- ... -->
58+
> </tbody>
59+
> </table>
4660
> ```
4761
4862
@@ -51,64 +65,78 @@ WAVE Tool's Reference material on Layout table may not specifically address your
5165
The following material covers how the Project Team has provided a solution to the layout table WAVE alert.
5266
5367
### Project Page Details
54-
- Project Page name: [INSERT PAGE NAME or "ALL"]
55-
- Project Staging URL: [INSERT URL or "N/A"]
56-
- Requires sign in: [TRUE OR FALSE]
57-
- Required User Role: [INSERT ONE OF: Visitor, Logged in user, Admin, Security Admin]
58-
- Can access page directly from URL: [TRUE OR FALSE]
59-
- Accepts URL parameters: [TRUE OR FALSE]
68+
- Project Page name: Archived Projects
69+
- Project Staging URL: https://tdm-dev.azurewebsites.net/archivedprojects
70+
- Requires sign in: TRUE
71+
- Required User Role: Security Admin
72+
- Can access page directly from URL: FALSE
73+
- Accepts URL parameters: FALSE
6074
6175
### Project Team Issue and PR details
6276
- Related GitHub Issue(s):
63-
- [INSERT ISSUE URL]
77+
- https://github.com/hackforla/tdm-calculator/issues/2837
6478
- Related Pull Request(s):
65-
- [INSERT PR URL]
79+
- https://github.com/hackforla/tdm-calculator/pull/3068
6680
- React Component(s)
67-
- [INSERT PATH: e.g. path/to/Component.jsx]
81+
- client\src\components\ArchiveDelete\ProjectsArchive.jsx
6882
6983
### Project Team Solution
7084
7185
#### What is the specific problem that was occurring?
7286
<!-- 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 -->
73-
[INSERT CONTENT]
87+
This alert occurred on the Archived Projects page, caused by a table using td elements in the header, instead of the expected th elements. In this case, the table is really a data table, and the error was triggered since the wrong tag was used.
88+
If the table is used to set the layout of content on the page, it is recommended to use other CSS features such as Grid or Flexbox to achieve this.
7489
7590
#### What is the proposed solution to this problem?
7691
<!-- 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 -->
77-
[INSERT CONTENT]
92+
Ensure that the table contains a header and `<th>` elements.
7893
7994
#### Step-By-Step Guide
8095
<!-- Author Instructions: Replace details dropdown with N/A if this does not apply -->
8196
8297
??? Info "Click to see step-by-step guide"
8398
84-
[ADD DETAILED INSTRUCTIONS HERE]
99+
- n/a
85100
86101
87102
#### Other Technical Details
88103
<!-- Author Instructions: Write N/A if this does not apply -->
89104
90105
??? Info "Click to see other technical details"
91106
92-
[INSERT OTHER DETAILS e.g. Prop References, Return Value]
93-
107+
- n/a
108+
94109
#### Code Snippet With Solution
95110
??? Info "Click to see code snippets"
96111
97-
[INSERT PATH file/path/to/Snippet.jsx]
98-
99112
```jsx
100-
[Code example showing the fix/solution]
113+
// client\src\components\ArchiveDelete\ProjectsArchive.jsx
114+
115+
const ProjectsArchive = () => {
116+
// ...
117+
return (
118+
// ...
119+
<table className={classes.table}>
120+
<thead className={classes.thead}>
121+
<tr className={classes.tr}>
122+
<th className={classes.td}>Name</th> // ensure that the table has a header and th elements
123+
// ...
124+
</tr>
125+
</thead>
126+
<tbody className={classes.tbody}>
127+
// ...
128+
</tbody>
129+
// ...
130+
);
101131
```
102132
103133
#### Why the Fix Works
104134
<!-- Author Instruction: Add an explanation of how the code changes resolve the accessibility issue and why this approach was chosen -->
105-
[INSERT CONTENT]
135+
Adding a header and th elements to the table fixes the error by making sure the table is interpreted as a data table.
106136
107137
#### Where this solution is applicable
108138
<!-- 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 -->
109-
- [INSERT SCENARIO 1]
110-
- [INSERT SCENARIO 2]
111-
- [INSERT SCENARIO N]
139+
- tables
112140
113141
#### Screenshots of WAVE Error
114142
@@ -133,5 +161,4 @@ The following material covers how the Project Team has provided a solution to th
133161
## Credits/Authors
134162
<!-- 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 -->
135163
- @Rabia2219
136-
- [INCLUDE Contributor 2]
137-
- [INCLUDE Contributor N]
164+
- @Philc90

0 commit comments

Comments
 (0)