Skip to content

Commit

Permalink
Script for building index of examples: Add missing roles (pull #1084)
Browse files Browse the repository at this point in the history
* added missing roles to reference table script'

* fixed misspelled statsu role'
Adds 5 roles to the list of roles and updates the index of examples.
  • Loading branch information
jongund authored and mcking65 committed Jul 14, 2019
1 parent 0d2eea6 commit 1bf0520
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ <h2 id="examples_by_role_label">Examples by Role</h2>
</tr>
</thead>
<tbody id="examples_by_role_tbody">
<tr>
<td><code>alert</code></td>
<td><a href="alert/alert.html">Alert</a></td>
</tr>
<tr>
<td><code>alertdialog</code></td>
<td><a href="dialog-modal/alertdialog.html">Alert Dialog</a></td>
</tr>
<tr>
<td><code>article</code></td>
<td><a href="feed/feed.html">Feed</a></td>
Expand Down Expand Up @@ -80,6 +88,15 @@ <h2 id="examples_by_role_label">Examples by Role</h2>
<td><code>contentinfo</code></td>
<td><a href="landmarks/contentinfo.html">Contentinfo Landmark</a></td>
</tr>
<tr>
<td><code>dialog</code></td>
<td>
<ul>
<li><a href="dialog-modal/datepicker-dialog.html">Date Picker Dialog</a></li>
<li><a href="dialog-modal/dialog.html">Modal Dialog</a></li>
</ul>
</td>
</tr>
<tr>
<td><code>feed</code></td>
<td><a href="feed/feed.html">Feed</a></td>
Expand Down
7 changes: 7 additions & 0 deletions scripts/reference-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ let output = fs.readFileSync(exampleTemplatePath, function (err) {
const $ = cheerio.load(output);

const ariaRoles = [
'alert',
'alertdialog',
'application',
'article',
'banner',
Expand All @@ -32,6 +34,7 @@ const ariaRoles = [
'complementary',
'contentinfo',
'definition',
'dialog',
'directory',
'document',
'feed',
Expand All @@ -46,7 +49,9 @@ const ariaRoles = [
'list',
'listbox',
'listitem',
'log',
'main',
'marquee',
'math',
'menu',
'menubar',
Expand All @@ -70,13 +75,15 @@ const ariaRoles = [
'separator',
'slider',
'spinbutton',
'status',
'switch',
'tab',
'table',
'tablist',
'tabpanel',
'term',
'textbox',
'timer',
'toolbar',
'tooltip',
'tree',
Expand Down

0 comments on commit 1bf0520

Please sign in to comment.