-
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
Open
EricDunsworth
wants to merge
1
commit into
wet-boew:master
Choose a base branch
from
EricDunsworth:feedback-fr-pagedata-role-status
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<div id="gc-pft" class="row wb-disable-allow" data-wb-jsonmanager='{ | ||
"name": "gc-pft", | ||
"extractor": [ | ||
{ "selector": "title", "path": "pageData/pageTitle" }, | ||
{ "selector": "html", "attr": "lang", "path": "pageData/language" }, | ||
{ "interface": "locationHref", "path": "pageData/submissionPage" }, | ||
{ "selector": "#wb-lng ul li:first-child a[lang]", "attr": "href", "path": "pageData/oppositelang" }, | ||
{ "selector": "[data-feedback-theme]", "attr": "data-feedback-theme", "path": "pageData/themeopt" }, | ||
{ "selector": "[data-feedback-section]", "attr": "data-feedback-section", "path": "pageData/sectionopt" }, | ||
{ "selector": "meta[name=\"dcterms.creator\"]", "attr": "content", "path": "pageData/institutionopt" }, | ||
{ "selector": "[data-feedback-link]", "attr": "data-feedback-link", "path": "contact/link" }, | ||
{ "selector": "[data-feedback-url]", "attr": "data-feedback-url", "path": "contact/url" } | ||
] | ||
}'> | ||
<div class="col-sm-10 col-md-9 col-lg-8"> | ||
<section class="well mrgn-bttm-0"> | ||
<h3 class="wb-inv">Give feedback about this page</h3> | ||
<form action="https://feedback-retroaction.canada.ca/api/QueueProblemForm" method="post" class="wb-postback wb-disable-allow" data-wb-postback='{"success":".gc-pft-thnk"}'> | ||
<div class="wb-disable-allow" data-wb-json='{ | ||
"url": "#[gc-pft]/pageData", | ||
"mapping": [ | ||
{ "selector": "input", "attr": "name", "value": "/@id" }, | ||
{ "selector": "input", "attr": "value", "value": "/@value" } | ||
] | ||
}'> | ||
<template> | ||
<input type="hidden" name="" value="" /> | ||
</template> | ||
</div> | ||
<fieldset class="gc-pft-btns chkbxrdio-grp row row-no-gutters d-sm-flex flex-sm-wrap align-items-sm-center"> | ||
<legend class="col-xs-12 col-sm-7 nojs-col-sm-12 col-md-9 col-lg-8 text-center text-sm-left nojs-text-left mrgn-tp-sm pr-sm-3"><span class="field-name">Did you find what you were looking for?</span></legend> | ||
<div class="col-xs-12 nojs-show"> | ||
<button name="helpful" value="Yes-Oui" class="btn btn-primary" aria-describedby="gc-pft-why">Yes</button> | ||
</div> | ||
<div class="col-xs-12 col-sm-5 col-md-3 col-lg-4 text-center text-sm-right nojs-hide"> | ||
<button name="helpful" value="Yes-Oui" class="btn btn-primary">Yes</button> | ||
<button class="btn btn-primary mrgn-lft-sm" data-wb-doaction='[ | ||
{"action":"removeClass","source":".gc-pft-no","class":"nojs-show"}, | ||
{"action":"addClass","source":".gc-pft-btns","class":"hide"} | ||
]'>No</button> | ||
</div> | ||
</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> | ||
<div class="wb-disable-allow" data-wb-json='{ | ||
"url": "#[gc-pft]/contact", | ||
"streamline": "true", | ||
"mapping": [ | ||
{ | ||
"template": "[data-contact-template]", | ||
"test": "fn:isLiteral", | ||
"assess": "/url", | ||
"mapping": [ | ||
{ "selector": "a", "type": "attr", "attr": "href", "value": "/url" }, | ||
{ "selector": "a", "value": "/link" } | ||
] | ||
} | ||
] | ||
}'> | ||
<template data-contact-template> | ||
<details> | ||
<summary>Need urgent help with a problem? Contact us</summary> | ||
<p class="mrgn-bttm-0 mrgn-tp-md fnt-nrml"> | ||
<a href="#"></a> | ||
</p> | ||
</details> | ||
</template> | ||
</div> | ||
<div class="form-group"> | ||
<label id="gc-pft-prblm-label" for="gc-pft-prblm" class="mrgn-bttm-0"><span class="field-name">Please provide more details</span></label> | ||
<p id="gc-pft-prblm-note" class="mrgn-bttm-sm"><small>You will not receive a reply. Don't include personal information (telephone, email, SIN, financial, medical, or work details).</small></p> | ||
<p id="gc-pft-prblm-instruction" class="fnt-nrml small">Maximum 300 characters</p> | ||
<textarea id="gc-pft-prblm" aria-describedby="gc-pft-prblm-note gc-pft-prblm-instruction" name="details" class="form-control full-width" maxlength="300"></textarea> | ||
</div> | ||
<button name="helpful" value="No-Non" class="btn btn-primary">Submit</button> | ||
</div> | ||
</form> | ||
<div class="gc-pft-thnk hide"> | ||
<p class="mrgn-tp-sm mrgn-bttm-0" role="status"><span class="glyphicon glyphicon-ok text-success mrgn-rght-sm" aria-hidden="true"></span> Thank you for your feedback.</p> | ||
</div> | ||
</section> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<div id="gc-pft" class="row wb-disable-allow" data-wb-jsonmanager='{ | ||
"name": "gc-pft", | ||
"extractor": [ | ||
{ "selector": "title", "path": "pageTitle" }, | ||
{ "selector": "html", "attr": "lang", "path": "language" }, | ||
{ "interface": "locationHref", "path": "submissionPage" }, | ||
{ "selector": "#wb-lng ul li:first-child a[lang]", "attr": "href", "path": "oppositelang" }, | ||
{ "selector": "[data-feedback-theme]", "attr": "data-feedback-theme", "path": "themeopt" }, | ||
{ "selector": "[data-feedback-section]", "attr": "data-feedback-section", "path": "sectionopt" }, | ||
{ "selector": "meta[name=\"dcterms.creator\"]", "attr": "content", "path": "institutionopt" }, | ||
{ "selector": "[data-feedback-link]", "attr": "data-feedback-link", "path": "contact/link" }, | ||
{ "selector": "[data-feedback-url]", "attr": "data-feedback-url", "path": "contact/url" } | ||
] | ||
}'> | ||
<div class="col-sm-10 col-md-9 col-lg-8"> | ||
<section class="well mrgn-bttm-0"> | ||
<h3 class="wb-inv">Donnez votre rétroaction sur cette page</h3> | ||
<form action="https://feedback-retroaction.canada.ca/api/QueueProblemForm" method="post" class="wb-postback wb-disable-allow" data-wb-postback='{"success":".gc-pft-thnk"}'> | ||
<div class="wb-disable-allow" data-wb-json='{ | ||
"url": "#[gc-pft]", | ||
"mapping": [ | ||
{ "selector": "input", "attr": "name", "value": "/@id" }, | ||
{ "selector": "input", "attr": "value", "value": "/@value" } | ||
] | ||
}'> | ||
<template> | ||
<input type="hidden" name="" value="" /> | ||
</template> | ||
</div> | ||
<fieldset class="gc-pft-btns chkbxrdio-grp row row-no-gutters d-sm-flex flex-sm-wrap align-items-sm-center"> | ||
<legend class="col-xs-12 col-sm-7 nojs-col-sm-12 col-md-9 col-lg-8 text-center text-sm-left nojs-text-left mrgn-tp-sm pr-sm-3"><span class="field-name">Avez-vous trouvé ce que vous cherchiez?</span></legend> | ||
<div class="col-xs-12 nojs-show"> | ||
<button name="helpful" value="Yes-Oui" class="btn btn-primary" aria-describedby="gc-pft-why">Oui</button> | ||
</div> | ||
<div class="col-xs-12 col-sm-5 col-md-3 col-lg-4 text-center text-sm-right nojs-hide"> | ||
<button name="helpful" value="Yes-Oui" class="btn btn-primary">Oui</button> | ||
<button class="btn btn-primary mrgn-lft-sm" data-wb-doaction='[ | ||
{"action":"removeClass","source":".gc-pft-no","class":"nojs-show"}, | ||
{"action":"addClass","source":".gc-pft-btns","class":"hide"} | ||
]'>Non</button> | ||
</div> | ||
</fieldset> | ||
<div class="gc-pft-no nojs-show"> | ||
<p id="gc-pft-why" class="nojs-show mrgn-tp-lg mrgn-bttm-md">Sinon, dites nous pourquoi ci-dessous :</p> | ||
<p class="nojs-hide wb-inv" aria-live="polite">Dites nous pourquoi ci-dessous :</p> | ||
<div class="wb-disable-allow" data-wb-json='{ | ||
"url": "#[gc-pft]/contact", | ||
"streamline": "true", | ||
"mapping": [ | ||
{ | ||
"template": "[data-contact-template]", | ||
"test": "fn:isLiteral", | ||
"assess": "/url", | ||
"mapping": [ | ||
{ "selector": "a", "type": "attr", "attr": "href", "value": "/url" }, | ||
{ "selector": "a", "value": "/link" } | ||
] | ||
} | ||
] | ||
}'> | ||
<template data-contact-template> | ||
<details> | ||
<summary>Besoin d’aide urgente pour résoudre un problème? Communiquez avec nous</summary> | ||
<p class="mrgn-bttm-0 mrgn-tp-md fnt-nrml"> | ||
<a href="#"></a> | ||
</p> | ||
</details> | ||
</template> | ||
</div> | ||
<div class="form-group"> | ||
<label for="gc-pft-prblm" class="mrgn-bttm-0"><span class="field-name">Veuillez fournir plus de détails</span></label> | ||
<p id="gc-pft-prblm-note" class="mrgn-bttm-sm"><small>Vous ne recevrez pas de réponse. N'incluez pas de renseignements personnels (téléphone, courriel, NAS, renseignements financiers, médicaux ou professionnels).</small></p> | ||
<p id="gc-pft-prblm-instruction" class="fnt-nrml small">Maximum de 300 caractères</p> | ||
<textarea id="gc-pft-prblm" aria-describedby="gc-pft-prblm-note gc-pft-prblm-instruction" name="details" class="form-control full-width" maxlength="300"></textarea> | ||
</div> | ||
<button name="helpful" value="No-Non" class="btn btn-primary">Soumettre</button> | ||
</div> | ||
</form> | ||
<div class="gc-pft-thnk hide"> | ||
<p class="mrgn-tp-sm mrgn-bttm-0" role="status"><span class="glyphicon glyphicon-ok text-success mrgn-rght-sm" aria-hidden="true"></span> Merci de vos commentaires.</p> | ||
</div> | ||
</section> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: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:
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.