Skip to content

Commit

Permalink
updated rating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jongund committed Oct 8, 2023
1 parent fe20292 commit 85dae46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions content/patterns/slider/examples/js/slider-rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class RatingSlider {
return 'no rating selected';

case 0:
return 'Unacceptable service';
return 'Unacceptable';

case 1:
return 'Extremely dissatisfied';
Expand Down Expand Up @@ -124,7 +124,7 @@ class RatingSlider {
return 'no rating on the 11 point rating scale selected';

case 0:
return 'Unacceptable service, first of eleven point rating scale';
return 'Unacceptable, first of eleven point rating scale';

case 1:
return 'Extremely dissatisfied, second of eleven point rating scale';
Expand Down
12 changes: 6 additions & 6 deletions content/patterns/slider/examples/slider-rating.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2>Accessibility Features</h2>
<li>To highlight the interactive nature of the satisfaction rating, a focus ring appears around the group of rating options when the thumb has focus and no rating value has been selected.</li>
<li>
To ensure the borders of the circles and focus ring have sufficient contrast with the background when high contrast settings invert colors, the color of the borders are synchronized with the color of the text content.
For example, the color of the circle borders is set to match the foreground color of high contrast mode text by specifying the CSS <code>currentcolor</code> value for the <code>stroke</code> property of each inline SVG <code>polygon</code> element.
For example, the color of the circle borders is set to match the foreground color of high contrast mode text by specifying the CSS <code>currentcolor</code> value for the <code>stroke</code> property of each inline SVG <code>circle</code> and <code>text</code> elements.
If specific colors were used to specify the <code>stroke</code> and <code>fill</code> properties, the color of these elements would remain the same in high contrast mode, which could lead to insufficient contrast between them and their background or even make them invisible if their color were to match the high contrast mode background.<br>
Note: The SVG element needs to have the CSS <code>forced-color-adjust</code> property set to the value <code>auto</code> for the <code>currentcolor</code> value to be updated in high contrast modes.
Some browsers do not use <code>auto</code> for the default value.</li>
Expand Down Expand Up @@ -185,23 +185,23 @@ <h2 id="kbd_label">Keyboard Support</h2>
<th><kbd>Page Up</kbd></th>
<td>
Increases slider value multiple steps.
In this slider, by two rating step.
In this slider, by two rating steps.
</td>
</tr>
<tr data-test-id="key-page-down">
<th><kbd>Page Down</kbd></th>
<td>
Decreases slider value multiple steps.
In this slider, by two rating step.
In this slider, by two rating steps.
</td>
</tr>
<tr data-test-id="key-home">
<th><kbd>Home</kbd></th>
<td>Sets slider to its minimum value, unaccpetable.</td>
<td>Sets slider to its minimum value, unacceptable.</td>
</tr>
<tr data-test-id="key-end">
<th><kbd>End</kbd></th>
<td>Sets slider to its maximum value, completely satisified.</td>
<td>Sets slider to its maximum value, completely satisfied.</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -262,7 +262,7 @@ <h2 id="rps_label">Role, Property, State, and Tabindex Attributes</h2>
<td>
<code>div</code>
</td>
<td>Specifies the minimum value of the slider. <br/>NOTE: -1 means no rating value has been selected.</td>
<td>Specifies the minimum value of the slider. <br/>NOTE: -1 identifies the slider as having no rating value selected.</td>

Check failure on line 265 in content/patterns/slider/examples/slider-rating.html

View workflow job for this annotation

GitHub Actions / lint-html

The empty tag : [ br ] must not use self closed syntax. [error/empty-tag-not-self-closed]

Check failure on line 265 in content/patterns/slider/examples/slider-rating.html

View workflow job for this annotation

GitHub Actions / lint-html

The empty tag : [ br ] must not use self closed syntax. [error/empty-tag-not-self-closed]
</tr>
<tr data-test-id="aria-valuenow">
<td></td>
Expand Down
2 changes: 1 addition & 1 deletion test/tests/slider_slider-rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const getRatingValueAndText = function (v, change) {
break;

case 0:
valuetext = 'Unacceptable service';
valuetext = 'Unacceptable';
break;

case 1:
Expand Down

0 comments on commit 85dae46

Please sign in to comment.