Open EricDunsworth opened 2 months ago
Pre-approved upon successful code review and accessibility testing. This will need to be coordinated with an AEM release.
@Garneauma Here's my in-depth rationale for the aria-live="polite"
to role="status"
change:
role="status"
is a better fit for the no button's transition message ("Tell us why below:") than aria-live="polite"
:
role="status"
represents a role, whereas aria-live="polite"
is a property of that rolestatus
role:
status
role A type of live region whose content is advisory information for the user but is not important enough to justify an alert, often but not necessarily presented as a status bar.
status message change in content that is not a change of context, and that provides information to the user on the success or results of an action, on the waiting state of an application, on the progress of a process, or on the existence of errors
role
attribute to be usedrole="status"
to be used for that purpose (albeit in combination with other techniques that don't apply to the content in question)role="status"
aria-live="polite"
) and the thank you message (role="status"
)... IMO it'd make sense to code them in a consistent mannerTwo more points:
role
(as opposed to aria-live
)aria-live="polite"
for both status messages. So both messages were originally coded consistently.aria-live="polite"
was kept for the no messagerole="status"
To remove the confusion, we would need to do and document actual test with AT that illustrate the issue and that are illustrating the solution are fixing the issue. Those test can be documented into a partial accessibility assessment.
To remove the confusion, we would need to do and document actual test with AT that illustrate the issue and that are illustrating the solution are fixing the issue. Those test can be documented into a partial accessibility assessment.
@duboisp
Just to clarify, my goal with adding role="status"
wasn't to fix a specific screen reader issue.
My initial intent with this PR was to fix the French pageData
references, but while prepping it I randomly noticed that ARIA semantics were being used inconsistently on what I'd consider to be two status messages. So I decided to make them consistent by using role="status"
on both (which appears to be the most semantically-correct way of denoting status messages).
I only have NVDA at my disposal, but from what I tested while prepping the PR, both aria-live="polite"
and role="status"
functioned identically in practice (which makes sense given that role="status"
implicitly sets aria-live="polite"
and aria-atomic="true"
).
I don't think there'd be much value in attempting to document this change's impact on screen readers. Both the "before" and "after" behaviour is identical. Not to mention that role="status"
is already being used in one of the status messages without any issues. This situation doesn't involve quirky AT behaviour, so there isn't really anything worth documenting.
In any case, if you feel strongly about this and would prefer to keep the status quo, I could revert the role="status"
change and focus solely on the French pageData
fixes.
Thoughts?
The AJAX fragments had two minor flaws:
pageData
references that were missing from the French variant. That difference caused a hiddeninput
named "contact" (with a JSON string as its value) to be injected into French feedback widgets. Although it didn't cause any other issues (data-feedback-link
anddata-feedback-url
still worked fine in practice).button
's invisible transition message in JS mode is technically a status message, but wasn't coded as such (was usingaria-live="polite"
as opposed torole="status"
).This resolves the flaws by:
pageData
references throughout the French fragment (same spots as English) to eliminate the hidden "contact"input
.aria-live="polite"
withrole="status"
in the nobutton
's transition message:role="status"
is a more formal way of denoting status messages, implicitly setsaria-live="polite"
+aria-atomic="true"
and is already in use for the widget's thank you message.