-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page feedback tool: Polish AJAX fragments (FR pageData, role="status") #2401
base: master
Are you sure you want to change the base?
Page feedback tool: Polish AJAX fragments (FR pageData, role="status") #2401
Conversation
The AJAX fragments had two minor flaws: * The English fragment contained pageData references that were missing from the French variant. That difference caused a hidden input 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 and data-feedback-url still worked fine in practice). * The no button's invisible transition message in JS mode is technically a status message, but wasn't coded as such (was using aria-live="polite" as opposed to role="status"). This resolves the flaws by: * Adding pageData references throughout the French fragment (same spots as English) to eliminate the hidden "contact" input. * Replacing aria-live="polite" with role="status" in the no button's transition message: * role="status" is a more formal way of denoting status messages, implicitly sets aria-live="polite" + aria-atomic="true" and is already in use for the widget's thank you message.
0d60cf1
to
4d05427
Compare
"modified": "2024-07-19", | ||
"componentName": "feedback", | ||
"status": "stable", | ||
"version": "2.0", | ||
"version": "2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a reality check on whether it was appropriate to update these lines.
The feedback component's version seems to be tracked separately from the PFT "sub-component"...
Since I updated the PFT to version 1.1 (shown as 2 in JSON-LD iteration variables)... I figured it'd also make sense to update feedback to 2.1 (since PFT "belongs" to it).
"fixes": [ | ||
"AJAX fragment: Added <code>pageData</code> to the French variant", | ||
"AJAX fragment: Changed <code>aria-live=\"polite\"</code> to <code>role=\"status\"</code> in \"Tell us why below:\"." | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these "AJAX fragment:" prefixes appropriate?
Are there any standardized prefixes these kinds of notes are supposed to follow?
Here's what I've spotted:
- Some pre-existing
fixes
arrays contain no prefixes at all, whereas others use "Demoted/Style:". - The similar-looking
breaking
/additions
arrays are usually prefixed with "Layout/Semantic/Behaviour:"... but sometimes lack prefixes.
Pre-approved upon successful code review and accessibility testing. This will need to be coordinated with an AEM release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EricDunsworth I have not noticed any difference between having the aria-live="polite"
and role="status"
either with NVDA or MAC OS accessibility tool. Also, the only gain I can see from having role="status"
is to have the implicit attribute aria-atomic="true"
which would read the whole content of the container that has the attribute role="status"
. In this case, since the element in question is <p class="nojs-hide wb-inv" role="status">Tell us why below:</p>
, the whole element is updated (shown) and not a child element, so the aria-atomic="true"
has no impact.
If you are adamant about having this change included in the file, please provide an accessibility conformance report that clearly highlights what accessibility standards the current solution fails. We will then assess the situation and make the necessary changes.
I would be happy to discuss this further if you have questions or concerns.
I will, however, gladly accept the changes to the French version of the asset so that it matches the English one. This would be a patch. The changes to the index.json-ld would need to be reverted.
@Garneauma Here's my in-depth rationale for the
|
Two more points:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is rejected, the use case is not valid according to the WCAG definition of status message 4.1.3
Where the SC of 4.1.3 is defined as:
In content implemented using markup languages, status messages can be programmatically determined through role or properties such that they can be presented to the user by assistive technologies without receiving focus.
I will take a peek later at the understanding but so far the current markup is passing the SC 4.1.3 even if it don't use the explicit role "status".
@@ -42,7 +42,7 @@ <h3 class="wb-inv">Give feedback about this page</h3> | |||
</fieldset> | |||
<div class="gc-pft-no nojs-show"> | |||
<p id="gc-pft-why" class="nojs-show mrgn-tp-lg mrgn-bttm-md">If not, tell us why below:</p> | |||
<p class="nojs-hide wb-inv" aria-live="polite">Tell us why below:</p> | |||
<p class="nojs-hide wb-inv" role="status">Tell us why below:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a status message according to WCAG definition. That don't represent the result of an user action.
The line 80 is the status message and it is marked by using the role=status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I previously explained my rationale in-depth in #2401 (comment) and #2401 (comment).
But I'll explain exactly why I think the no message fits within ARIA and WCAG's definitions below... :).
Here's ARIA 1.2 spec's definition of the status
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.
IMO "Tell us why below:" is advisory information that isn't important-enough to warrant an alert nor a status bar. It's triggered as the direct result of a user action (i.e. pressing the "No" button).
Here's WCAG 2.x's definition of a status message:
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
IMO "Tell us why below:" represents both information on the result of the act of pressing the "No" button, as well as the progress of the process of providing feedback. It's the second "step" in the process of providing negative feedback.
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 My initial intent with this PR was to fix the French I only have NVDA at my disposal, but from what I tested while prepping the PR, both 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 In any case, if you feel strongly about this and would prefer to keep the status quo, I could revert the 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.