All headings include a completion description aria-label. This is added via the heading hbs and updated by headingView. The selector .aria-label is a generic class used to apply styling to visually hide an element and is used throughout Adapt.
In the instance an a11y_alt_texthelper is used within a displayTitle, the generic selector .aria-label shared between the completion description aria-label and a11y_alt_text helper means the completion description overrides the a11y_alt_text. See screen shots below.
Incomplete component
The first .aria-label includes the completion description as expected.
The second .aria-label includes the helper alternative text as expected.
This reads "Incomplete. I wish I had five billion dollars"
Complete component
The first .aria-label includes the completion description as expected.
The second .aria-label has been overwritten by the completion description.
This reads "Completed. I wish I had Completed."
Expected behaviour
Only use .aria-label to inherit styling. Use js- prefixed selectors for functionality. This will prevent functionality clashes between elements of a shared selector.
Subject of the issue
All headings include a completion description aria-label. This is added via the heading hbs and updated by headingView. The selector
.aria-label
is a generic class used to apply styling to visually hide an element and is used throughout Adapt.In the instance an
a11y_alt_text
helper is used within adisplayTitle
, the generic selector.aria-label
shared between the completion description aria-label anda11y_alt_text
helper means the completion description overrides thea11y_alt_text
. See screen shots below.Incomplete component The first
.aria-label
includes the completion description as expected. The second.aria-label
includes the helper alternative text as expected. This reads "Incomplete. I wish I had five billion dollars"Complete component The first
.aria-label
includes the completion description as expected. The second.aria-label
has been overwritten by the completion description. This reads "Completed. I wish I had Completed."Expected behaviour
Only use
.aria-label
to inherit styling. Usejs-
prefixed selectors for functionality. This will prevent functionality clashes between elements of a shared selector.