Skip to content

Commit

Permalink
Infrastructure: Updates example index generation and coverage report …
Browse files Browse the repository at this point in the history
…scripts (pull #1859)

Updates the scripts that generate the example index and coverage reports:
* Updated list of roles to include new roles in ARIA 1.2:
   * caption 
   * code 
   * deletion 
   * emphasis 
   * generic 
   * input 
   * insertion 
   * meter 
   * paragraph 
* Fixed bug in aria-label  also getting references to aria-labelledby , by using a regex, and this was also applied to checking roles. 
* Updated code to use node-html-parser  for identify the roles, properties and states associated with an example, making the code much easier to read and understand. 
* Added the identification of examples with specific high contrast support features.
* Updated coverage report to provide more information on example quality assurance. 
* Add a coding practices section to the coverage report to monitor implementation of APG coding practices.
  • Loading branch information
jongund committed May 4, 2021
1 parent eb663f3 commit 276fed3
Show file tree
Hide file tree
Showing 16 changed files with 2,854 additions and 942 deletions.
2,305 changes: 1,844 additions & 461 deletions coverage/index.html

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions coverage/prop-coverage.csv

Large diffs are not rendered by default.

67 changes: 40 additions & 27 deletions coverage/role-coverage.csv
@@ -1,70 +1,83 @@
"Role","Guidance","Examples","References"
"alert","2","1","Guidance: Alert","Guidance: Alert and Message Dialogs","Example: Alert"
"alert","2","2","Guidance: Alert","Guidance: Alert and Message Dialogs","Example: Alert","Example: Alert Dialog"
"alertdialog","0","1","Example: Alert Dialog"
"application","0","0"
"article","0","1","Example: Feed"
"banner","1","1","Guidance: Banner","Example: Banner Landmark"
"banner","1","3","Guidance: Banner","Example: Navigation Menubar","Example: Navigation Treeview","Example: Banner Landmark"
"button","2","2","Guidance: Button","Guidance: Menu Button","Example: Button (IDL Version)","Example: Button"
"cell","3","0","Guidance: Defining cell spans using aria-colspan and aria-rowspan ","Guidance: Whether to Focus on a Cell Or an Element Inside It","Guidance: Editing and Navigating Inside a Cell"
"caption","0","0"
"cell","3","1","Guidance: Whether to Focus on a Cell Or an Element Inside It","Guidance: Editing and Navigating Inside a Cell","Guidance: Defining cell spans using aria-colspan and aria-rowspan","Example: Table"
"checkbox","1","2","Guidance: Checkbox","Example: Checkbox (Two State)","Example: Checkbox (Mixed-State)"
"code","0","0"
"columnheader","0","1","Example: Table"
"combobox","2","5","Guidance: Combobox","Guidance: Combobox Keyboard Interaction","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Select-Only Combobox","Example: Editable Combobox with Grid Popup"
"combobox","2","6","Guidance: Combobox","Guidance: Combobox Keyboard Interaction","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Date Picker Combobox","Example: Select-Only Combobox","Example: Editable Combobox with Grid Popup"
"complementary","1","1","Guidance: Complementary","Example: Complementary Landmark"
"contentinfo","1","1","Guidance: Contentinfo","Example: Contentinfo Landmark"
"contentinfo","1","3","Guidance: Contentinfo","Example: Navigation Menubar","Example: Navigation Treeview","Example: Contentinfo Landmark"
"definition","0","0"
"dialog","2","3","Guidance: Dialog (Modal)","Guidance: Dialog Popup Keyboard Interaction","Example: Date Picker Combobox","Example: Date Picker Dialog","Example: Modal Dialog"
"deletion","0","0"
"dialog","2","3","Guidance: Dialog Popup Keyboard Interaction","Guidance: Dialog (Modal)","Example: Date Picker Combobox","Example: Date Picker Dialog","Example: Modal Dialog"
"directory","0","0"
"document","0","0"
"emphasis","0","0"
"feed","1","1","Guidance: Feed","Example: Feed"
"figure","0","0"
"form","2","1","Guidance: Naming Form Controls with the Label Element","Guidance: Form","Example: Form Landmark"
"grid","2","5","Guidance: Grid and Table Properties","Guidance: Grid Popup Keyboard Interaction","Example: Date Picker Combobox","Example: Editable Combobox with Grid Popup","Example: Date Picker Dialog","Example: Data Grid","Example: Layout Grid"
"gridcell","0","1","Example: Layout Grid"
"group","2","6","Guidance: Radio Group","Guidance: For Radio Group Contained in a Toolbar","Example: Auto-Rotating Image Carousel","Example: Checkbox (Two State)","Example: Editor Menubar","Example: Date Picker Spin Button","Example: Navigation Treeview Using Computed Properties","Example: Navigation Treeview Using Declared Properties"
"form","2","1","Guidance: Form","Guidance: Naming Form Controls with the Label Element","Example: Form Landmark"
"generic","0","0"
"grid","2","5","Guidance: Grid Popup Keyboard Interaction","Guidance: Grid and Table Properties","Example: Date Picker Combobox","Example: Editable Combobox with Grid Popup","Example: Date Picker Dialog","Example: Data Grid","Example: Layout Grid"
"gridcell","0","3","Example: Editable Combobox with Grid Popup","Example: Layout Grid","Example: Treegrid Email Inbox"
"group","2","9","Guidance: Radio Group","Guidance: For Radio Group Contained in a Toolbar","Example: Auto-Rotating Image Carousel with Buttons for Slide Control","Example: Checkbox (Two State)","Example: Listbox with Grouped Options","Example: Editor Menubar","Example: Color Viewer Slider","Example: Date Picker Spin Button","Example: File Directory Treeview Using Computed Properties","Example: File Directory Treeview Using Declared Properties","Example: Navigation Treeview"
"heading","0","0"
"img","0","0"
"input","0","0"
"insertion","0","0"
"link","1","1","Guidance: Link","Example: Link"
"list","0","0"
"listbox","2","8","Guidance: Listbox","Guidance: Listbox Popup Keyboard Interaction","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Select-Only Combobox","Example: Collapsible Dropdown Listbox","Example: Listbox with Grouped Options","Example: Listboxes with Rearrangeable Options","Example: Scrollable Listbox"
"listbox","2","8","Guidance: Listbox Popup Keyboard Interaction","Guidance: Listbox","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Select-Only Combobox","Example: Collapsible Dropdown Listbox","Example: Listbox with Grouped Options","Example: Listboxes with Rearrangeable Options","Example: Scrollable Listbox"
"listitem","0","0"
"log","0","0"
"main","1","1","Guidance: Main","Example: Main Landmark"
"marquee","0","0"
"math","0","0"
"menu","2","6","Guidance: Menu or Menu bar","Guidance: Menu Button","Example: Actions Menu Button Using aria-activedescendant","Example: Actions Menu Button Using element.focus()","Example: Navigation Menu Button","Example: Editor Menubar","Example: Navigation Menubar","Example: Toolbar"
"menubar","0","2","Example: Editor Menubar","Example: Navigation Menubar"
"menuitem","0","4","Example: Actions Menu Button Using element.focus()","Example: Navigation Menu Button","Example: Editor Menubar","Example: Navigation Menubar"
"menuitem","0","5","Example: Actions Menu Button Using aria-activedescendant","Example: Actions Menu Button Using element.focus()","Example: Navigation Menu Button","Example: Editor Menubar","Example: Navigation Menubar"
"menuitemcheckbox","0","1","Example: Editor Menubar"
"menuitemradio","0","2","Example: Editor Menubar","Example: Toolbar"
"navigation","5","1","Guidance: Fundamental Keyboard Navigation Conventions","Guidance: Keyboard Navigation Between Components (The Tab Sequence)","Guidance: Keyboard Navigation Inside Components","Guidance: Ensure Basic Access Via Navigation","Guidance: Navigation","Example: Navigation Landmark"
"none","0","2","Example: Navigation Menu Button","Example: Navigation Menubar"
"meter","2","1","Guidance: Meter","Guidance: Range properties with meter","Example: Meter"
"navigation","5","3","Guidance: Navigation","Guidance: Fundamental Keyboard Navigation Conventions","Guidance: Keyboard Navigation Between Components (The Tab Sequence)","Guidance: Keyboard Navigation Inside Components","Guidance: Ensure Basic Access Via Navigation ","Example: Navigation Menubar","Example: Navigation Treeview","Example: Navigation Landmark"
"none","0","3","Example: Navigation Menu Button","Example: Navigation Menubar","Example: Navigation Treeview"
"note","0","0"
"option","0","4","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Select-Only Combobox"
"presentation","4","0","Guidance: Intentionally Hiding Semantics with the presentation Role","Guidance: Effects of Role presentation ","Guidance: Conditions That Cause Role presentation to be Ignored","Guidance: Example Demonstrating Effects of the presentation Role"
"option","0","8","Example: Editable Combobox With Both List and Inline Autocomplete","Example: Editable Combobox With List Autocomplete","Example: Editable Combobox without Autocomplete","Example: Select-Only Combobox","Example: Collapsible Dropdown Listbox","Example: Listbox with Grouped Options","Example: Listboxes with Rearrangeable Options","Example: Scrollable Listbox"
"paragraph","0","0"
"presentation","3","0","Guidance: Intentionally Hiding Semantics with the presentation Role","Guidance:
Conditions That Cause Role presentation to be Ignored
","Guidance:
Example Demonstrating Effects of the presentation Role
"
"progressbar","0","0"
"radio","3","3","Guidance: Radio Group","Guidance: For Radio Groups Not Contained in a Toolbar","Guidance: For Radio Group Contained in a Toolbar","Example: Radio Group Using Roving tabindex","Example: Radio Group Using aria-activedescendant","Example: Toolbar"
"radiogroup","0","3","Example: Radio Group Using Roving tabindex","Example: Radio Group Using aria-activedescendant","Example: Toolbar"
"region","1","4","Guidance: Region","Example: Accordion","Example: Auto-Rotating Image Carousel","Example: Auto-Rotating Image Carousel with a Tablist","Example: Region Landmark"
"radio","3","3","Guidance: Radio Group","Guidance: For Radio Groups Not Contained in a Toolbar","Guidance: For Radio Group Contained in a Toolbar","Example: Radio Group Using aria-activedescendant","Example: Radio Group Using Roving tabindex","Example: Toolbar"
"radiogroup","0","3","Example: Radio Group Using aria-activedescendant","Example: Radio Group Using Roving tabindex","Example: Toolbar"
"region","1","6","Guidance: Region","Example: Accordion","Example: Auto-Rotating Image Carousel with Buttons for Slide Control","Example: Auto-Rotating Image Carousel with Tabs for Slide Control","Example: Navigation Menubar","Example: Navigation Treeview","Example: Region Landmark"
"row","0","4","Example: Editable Combobox with Grid Popup","Example: Layout Grid","Example: Table","Example: Treegrid Email Inbox"
"rowgroup","0","1","Example: Table"
"rowheader","0","0"
"scrollbar","0","0"
"search","1","1","Guidance: Search","Example: Search Landmark"
"searchbox","0","0"
"separator","0","1","Example: Editor Menubar"
"slider","2","3","Guidance: Slider","Guidance: Slider (Multi-Thumb)","Example: Horizontal Multi-Thumb Slider","Example: Horizontal Slider","Example: Slider with aria-orientation and aria-valuetext"
"slider","2","3","Guidance: Slider","Guidance: Slider (Multi-Thumb)","Example: Horizontal Multi-Thumb Slider","Example: Slider with aria-orientation and aria-valuetext","Example: Color Viewer Slider"
"spinbutton","1","2","Guidance: Spinbutton","Example: Date Picker Spin Button","Example: Toolbar"
"status","0","0"
"switch","0","0"
"tab","1","3","Guidance: Keyboard Navigation Between Components (The Tab Sequence)","Example: Auto-Rotating Image Carousel with a Tablist","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"table","2","1","Guidance: Grid and Table Properties","Guidance: Table","Example: Table"
"tablist","0","3","Example: Auto-Rotating Image Carousel with a Tablist","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"tabpanel","0","3","Example: Auto-Rotating Image Carousel with a Tablist","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"tab","1","3","Guidance: Keyboard Navigation Between Components (The Tab Sequence)","Example: Auto-Rotating Image Carousel with Tabs for Slide Control","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"table","2","1","Guidance: Table","Guidance: Grid and Table Properties","Example: Table"
"tablist","0","3","Example: Auto-Rotating Image Carousel with Tabs for Slide Control","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"tabpanel","0","3","Example: Auto-Rotating Image Carousel with Tabs for Slide Control","Example: Tabs with Automatic Activation","Example: Tabs with Manual Activation"
"term","0","0"
"textbox","0","0"
"timer","0","0"
"toolbar","3","1","Guidance: Toolbar","Guidance: For Radio Groups Not Contained in a Toolbar","Guidance: For Radio Group Contained in a Toolbar","Example: Toolbar"
"toolbar","3","1","Guidance: For Radio Groups Not Contained in a Toolbar","Guidance: For Radio Group Contained in a Toolbar","Guidance: Toolbar","Example: Toolbar"
"tooltip","1","0","Guidance: Tooltip Widget"
"tree","2","4","Guidance: Tree View","Guidance: Tree Popup Keyboard Interaction","Example: File Directory Treeview Using Computed Properties","Example: File Directory Treeview Using Declared Properties","Example: Navigation Treeview Using Computed Properties","Example: Navigation Treeview Using Declared Properties"
"tree","2","3","Guidance: Tree Popup Keyboard Interaction","Guidance: Tree View","Example: File Directory Treeview Using Computed Properties","Example: File Directory Treeview Using Declared Properties","Example: Navigation Treeview"
"treegrid","1","1","Guidance: Treegrid","Example: Treegrid Email Inbox"
"treeitem","0","4","Example: File Directory Treeview Using Computed Properties","Example: File Directory Treeview Using Declared Properties","Example: Navigation Treeview Using Computed Properties","Example: Navigation Treeview Using Declared Properties"
"treeitem","0","3","Example: File Directory Treeview Using Computed Properties","Example: File Directory Treeview Using Declared Properties","Example: Navigation Treeview"
2 changes: 1 addition & 1 deletion examples/combobox/combobox-datepicker.html
Expand Up @@ -456,7 +456,7 @@ <h3 id="rps_label_combobox">Combobox</h3>
</thead>
<tbody>
<tr data-test-id="textbox-role">
<th scope="row"><code>role="combobox"</code></th>
<th scope="row"><code>combobox</code></th>
<td></td>
<td><code>input</code></td>
<td>
Expand Down

0 comments on commit 276fed3

Please sign in to comment.