Special for CSS-Minsk-JS conf, 20-09-2019
"Liberty Leading the People", Eugène Delacroix
| BRO | NOT BRO |
|
|
Table layout can be used to represent tabular relationships between data.
See the Pen Tables. Ex2. overflow by Alena (@solarrust) on CodePen.
Horizontal scroll
See the Pen Tables. Ex3. Flex by Alena (@solarrust) on CodePen.
Cards are the new black
See the Pen Tables. Ex4. Flex + before by Alena (@solarrust) on CodePen.
Signs for cells
Do not use display: none
thead {
position: absolute;
top: -9999px;
left: -9999px;
}
Tab for navigation throw interactive elements.
VO key + ← ↑ ↓ → for navigation throw simple text and tables on the page.
VO key by default equal to Ctrl + Option.
role
<table>
<thead role="rowgroup">
<tr role="row">
<th role="columnheader">First name</th>
...
</thead>
</table>
role 🦸♂️<table> — table<thead> / <tbody> / <tfoot> — rowgroup<tr> — row<td> — cellcolumnheader to eachrowheader to eachscope
Talk with business / designer and find out is all this info so important for mobile users?
Hide unnecessary columns, but remember about aria-hidden="true"
See the Pen Tables. Not table by Alena (@solarrust) on CodePen.
Experiment
while (true) {
console.log("Developers avoid tables");
console.log("Working groups don't pay enough attention");
console.log("The standard staying in stagnation");
}