Skip to content

Commit c050bcc

Browse files
Change markers: add New visual style and remove unnecessary "text semantics" (#1481)
In WCAG 2.1 there's one change marker for the third note in "Full pages" https://www.w3.org/TR/WCAG21/#cc2 - this currently looks odd/just like an awkward start of the sentence. > ![WCAG 2.1 third note in 'Full pages', with 'New' at the start of the paragraph looking like it's just part of the sentence](https://user-images.githubusercontent.com/895831/96334873-e2599980-106b-11eb-9d28-775789405927.png) In WCAG 2.2, there's a few more change markers, and these use JavaScript to add "text semantics", wrapping them in square brackets. but these don't - to my mind at least - add anything useful ... they're not read out by default by AT unless you go character by character, and as they just live in their own little paragraph, they don't really need to delimit start/end of anything and are just as understandable without the square brackets. > ![one of WCAG 2.2's '[New]' change markers](https://user-images.githubusercontent.com/895831/96336427-9ca2ce00-1077-11eb-8ca2-f3db0f24bf22.png) **This PR adds a more visually explicit style, and removes the square brackets** ![WCAG 2.1 third note in 'Full pages', with 'New' at the start of the paragraph, now styled as bold white text on a red box with slightly rounded corners, like a tag/badge](https://user-images.githubusercontent.com/895831/96336449-c78d2200-1077-11eb-8b8b-47c50ac601a5.png) ![one of WCAG 2.2's 'New' change markers, styled as bold white text on a red box with slightly rounded corners, and without the square brackets around the word](https://user-images.githubusercontent.com/895831/96336471-fefbce80-1077-11eb-8683-00639fc6e18c.png)
1 parent 1b2d567 commit c050bcc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

guidelines/guidelines.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
}
44

55
.change {
6-
display:inline;
6+
display: inline;
7+
color: #fff;
8+
background: #B50000;
9+
border-radius: 0.25em;
10+
padding: 0.25em 0.4em;
11+
margin: 0 0.25em 0 0;
12+
font-weight: bold;
713
}
814

915
.new {

script/wcag.js

-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ function linkUnderstanding() {
3333
}
3434

3535
function addTextSemantics() {
36-
// put brackets around the change marker
37-
document.querySelectorAll('p.change').forEach(function(node){
38-
var change = node.textContent;
39-
node.textContent = "[" + change + "]";
40-
})
4136
// put level before and parentheses around the conformance level marker
4237
document.querySelectorAll('p.conformance-level').forEach(function(node){
4338
var level = node.textContent;

0 commit comments

Comments
 (0)