Skip to content

Commit

Permalink
doc: improve table accessibility
Browse files Browse the repository at this point in the history
The compatibility matrix in the N-API doc needs row headers for
accessibility purposes. Unfortunately, those aren't possible in markdown
without resorting to HTML markup. So this converts the table from
markdown to HTML. This is less convenient for documentation authors and
for other readers of the raw markdown docs, but I believe accessibility
for the viewers of our HTML docs outweighs that concern.

PR-URL: #35146
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
  • Loading branch information
Trott authored and ruyadorno committed Sep 17, 2020
1 parent 7dbcd24 commit e410514
Showing 1 changed file with 86 additions and 10 deletions.
96 changes: 86 additions & 10 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,92 @@ from version 3 with some additions. This means that it is not necessary
to recompile for new versions of Node.js which are
listed as supporting a later version.

| | 1 | 2 | 3 | 4 | 5 | 6 |
|-------|----------|----------|----------|----------|-----------|-----------|
| v6.x | | | v6.14.2* | | | |
| v8.x | v8.6.0** | v8.10.0* | v8.11.2 | v8.16.0 | | |
| v9.x | v9.0.0* | v9.3.0* | v9.11.0* | | | |
| v10.x | v10.0.0 | v10.0.0 | v10.0.0 | v10.16.0 | v10.17.0 | v10.20.0 |
| v11.x | v11.0.0 | v11.0.0 | v11.0.0 | v11.8.0 | | |
| v12.x | v12.0.0 | v12.0.0 | v12.0.0 | v12.0.0 | v12.11.0 | v12.17.0 |
| v13.x | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | |
| v14.x | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 |
<!-- For accessibility purposes, this table needs row headers. That means we
can't do it in markdown. Hence, the raw HTML. -->

<table>
<tr>
<td></td>
<th scope="col">1</th>
<th scope="col">2</th>
<th scope="col">3</th>
<th scope="col">4</th>
<th scope="col">5</th>
<th scope="col">6</th>
</tr>
<tr>
<th scope="row">v6.x</th>
<td></td>
<td></td>
<td>v6.14.2*</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th scope="row">v8.x</th>
<td>v8.6.0**</td>
<td>v8.10.0*</td>
<td>v8.11.2</td>
<td>v8.16.0</td>
<td></td>
<td></td>
</tr>
<tr>
<th scope="row">v9.x</th>
<td>v9.0.0*</td>
<td>v9.3.0*</td>
<td>v9.11.0*</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th scope="row">v10.x</th>
<td>v10.0.0</td>
<td>v10.0.0</td>
<td>v10.0.0</td>
<td>v10.16.0</td>
<td>v10.17.0</td>
<td>v10.20.0</td>
</tr>
<tr>
<th scope="row">v11.x</th>
<td>v11.0.0</td>
<td>v11.0.0</td>
<td>v11.0.0</td>
<td>v11.8.0</td>
<td></td>
<td></td>
</tr>
<tr>
<th scope="row">v12.x</th>
<td>v12.0.0</td>
<td>v12.0.0</td>
<td>v12.0.0</td>
<td>v12.0.0</td>
<td>v12.11.0</td>
<td>v12.17.0</td>
</tr>
<tr>
<th scope="row">v13.x</th>
<td>v13.0.0</td>
<td>v13.0.0</td>
<td>v13.0.0</td>
<td>v13.0.0</td>
<td>v13.0.0</td>
<td></td>
</tr>
<tr>
<th scope="row">v14.x</th>
<td>v14.0.0</td>
<td>v14.0.0</td>
<td>v14.0.0</td>
<td>v14.0.0</td>
<td>v14.0.0</td>
<td>v14.0.0</td>
</tr>
</table>

\* N-API was experimental.

Expand Down

0 comments on commit e410514

Please sign in to comment.