-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed bug with indexing aria-label property and added high contrast information #1709
Conversation
Do we want it to also match things like
|
@carmacleod Jon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jon, This was a great catch, thank you!!
We were definitely overlisting aria-label, and this is much better in that respect.
However, it does mistakenly leave out the checkbox example from aria-labelledby.
I see some examples where aria-label is used but not documented, but that is a separate issue. They should not be captured in the index (one of the layout grids and the rearrangeable listbox). I don't think it is worth capturing that in a separate issue because we already have issues calling for rework on both.
I think this may also introduce a new bug that effects indexing of aria-orientation. Strange that it is only that one property.
@@ -586,6 +586,7 @@ <h2 id="props_with_no_examples_label">Properties and States with No Guidance or | |||
<li><code>aria-invalid</code></li> | |||
<li><code>aria-keyshortcuts</code></li> | |||
<li><code>aria-multiline</code></li> | |||
<li><code>aria-orientation</code></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a a new bug here because aria-orientation does have an example in slider
</td> | ||
</tr> | ||
<tr> | ||
<td><code>aria-orientation</code></td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other side of the aria-orientation bug; it should not have been removed from this list.
</ul> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>aria-labelledby</code></td> | ||
<td> | ||
<ul> | ||
<li><a href="checkbox/checkbox-1/checkbox-1.html">Checkbox (Two State)</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a bug; aria-labelledby is used and documented in the checkbox-1 example.
@@ -652,17 +628,12 @@ <h2 id="examples_by_props_label">Examples By Properties and States</h2> | |||
<td><code>aria-multiselectable</code></td> | |||
<td><a href="listbox/listbox-rearrangeable.html">Listboxes with Rearrangeable Options</a></td> | |||
</tr> | |||
<tr> | |||
<td><code>aria-orientation</code></td> | |||
<td><a href="slider/slider-2.html">Slider with aria-orientation and aria-valuetext</a></td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same aria-orientation bug mentioned above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcking65
@carmacleod
I will update the indexing to use the regex suggestion and see if that fixed the issue with aria-orientation
.
@jongund In case it's helpful, here's a cheat sheet I use for regex: http://www.rexegg.com/regex-quickstart.html#ref |
@mcking65 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jon, this is looking better still.
Wow, isn't this devilishly difficult to fix/review? I notice a couple of places where the previous version fixed errors that are no longer getting fixed.
- Previous version fixed list of examples using aria-hidden; it removed Alert Dialog, which does not use aria-hidden.
- Previous version fixed list of examples using aria-posinset and aria-setsize; it removed File Directory Treeview Using Computed Properties, which do not use those properties.
I also noticed some other places where attributes are being overlooked by the algorithm.
- The aria-current index is missing Breadcrumb Example.
- The aria-modal index is missing Modal Dialog Example.
- The aria-selected index is missing:
- Date Picker Combobox Example
- Select-Only Combobox Example.
- Collapsible Dropdown Listbox Example
- Listbox Example with Grouped Options
- Scrollable Listbox Example
@mcking65 |
Renaming the breadcrumb example to |
@jongund |
@mcking65 |
Per discussion in March 30 meeting, Sarah will assist with a code review and help ensure it is robustly supporting our desired indexing behaviors. I thought we had those behaviors documented in the wiki; I can't find it. I believe they should be part of the infrastructure documentation. We should have documentation of:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one bug that should be updated, but otherwise it looks OK. Looking at the logic though, I wonder if we should consider moving to a node html parser in the future, so we're not trying to process html strings ourselves.
I don't want to hold up this PR, but it might be a good backlog item to look into converting this all to use something like this library: https://www.npmjs.com/package/node-html-parser
coverage/index.html
Outdated
<li><a href="../examples/checkbox/checkbox-1/checkbox-1.html">Checkbox (Two State)</a></li> | ||
<li><a href="../examples/coding-template/Depricated-MultipleImplementationExample-Template.html">EXAMPLE_NAME</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file (and the coding-template directory) should be excluded
@smhigley |
@jongund awesome! I'm also 100% in favor of merging this PR now, and letting that be a future item, though 😄 |
@smhigley |
@mcking65 @smhigley @carmacleod @nschonni |
Pull #1859 superceeds this pull request. |
The changes in the this pull request:
aria-label
also getting references toaria-labelledby
, by using a regex, and this was also applied to checking roles.node-html-parser
for identify the roles, properties and states associated with an example, making the code much easier to read and understand.aria-label
to indicate that the example has high contrast support (e.g. removed the use of thetitle
attribute from previous proposals). The information will also then be available in screen reader "list of links" feature/NOTE: The changes added
node-html-parser
to thepackage.json
file.Preview of example index
Preview of coverage report
Preview | Diff