Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
[a11y] Improve the visibility of link annotations in HCM
Browse files Browse the repository at this point in the history
In order to help to identify a link, we add a border around it with the LinkText color.
And backdrop colors are inverted when the mouse pointer hovers them, this way it should
help to identify the link where the pointer is.
  • Loading branch information
calixteman committed Feb 22, 2023
1 parent 255e982 commit a074525
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/annotation_layer_builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
--input-unfocused-border-color: transparent;
--input-disabled-border-color: transparent;
--input-hover-border-color: black;
--link-outline: none;
}

@media screen and (forced-colors: active) {
Expand All @@ -28,6 +29,7 @@
--input-unfocused-border-color: ActiveText;
--input-disabled-border-color: GrayText;
--input-hover-border-color: Highlight;
--link-outline: 1.5px solid LinkText;
}
.annotationLayer .textWidgetAnnotation input:required,
.annotationLayer .textWidgetAnnotation textarea:required,
Expand All @@ -36,6 +38,10 @@
.annotationLayer .buttonWidgetAnnotation.radioButton input:required {
outline: 1.5px solid selectedItem;
}

.annotationLayer .linkAnnotation:hover {
backdrop-filter: invert(100%);
}
}

.annotationLayer {
Expand All @@ -55,6 +61,10 @@
transform-origin: 0 0;
}

.annotationLayer .linkAnnotation {
outline: var(--link-outline);
}

.annotationLayer .linkAnnotation > a,
.annotationLayer .buttonWidgetAnnotation.pushButton > a {
position: absolute;
Expand Down

0 comments on commit a074525

Please sign in to comment.