Skip to content

Commit

Permalink
remove actual js to discourage copypasta
Browse files Browse the repository at this point in the history
  • Loading branch information
adampage authored Aug 1, 2024
1 parent 957880b commit 6475927
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7679,11 +7679,10 @@ <h5>Presentational Role Inheritance</h5>
&lt;/ol&gt;
&lt;/div&gt;
&lt;script&gt;
document.querySelectorAll('#ratings li').forEach(function(rating, index) {
rating.addEventListener('click', function() {
document.getElementById('pain').setAttribute('aria-valuetext', this.textContent);
});
});
// Not shown: Custom Javascript to implement a fully conformant ARIA slider pattern.
// Also, the `aria-valuetext` attribute of `div#pain` will be dynamically updated with
// the user’s chosen pain value corresponding to the visible mark and label presented
// by `ol#ratings` (e.g., "Pain interrupts some activities").
&lt;/script&gt;
</pre>
</div>
Expand Down

0 comments on commit 6475927

Please sign in to comment.