-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Outline fields which are required (bug 1724918) #15000
Conversation
calixteman
commented
Jun 7, 2022
- it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1724918;
- it applies for both Acroform and XFA.
web/annotation_layer_builder.css
Outdated
@media (forced-colors: active) { | ||
.annotationLayer .textWidgetAnnotation input:required, | ||
.annotationLayer .textWidgetAnnotation textarea:required, | ||
.annotationLayer .choiceWidgetAnnotation select:required, | ||
.annotationLayer .buttonWidgetAnnotation.checkBox input:required, | ||
.annotationLayer .buttonWidgetAnnotation.radioButton input:required { | ||
border: 1.5px solid selectedItem; | ||
} | ||
} |
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.
Similar to our other CSS files, can we please put this block after the :root
-definition at the top of the file (since that provides a better overview)?
web/xfa_layer_builder.css
Outdated
@media (forced-colors: active) { | ||
.xfaLayer *:required { | ||
outline: 1.5px solid selectedItem; | ||
} | ||
} |
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.
Similar to our other CSS files, can we please put this block after the :root
-definition at the top of the file (since that provides a better overview)?
src/display/annotation_layer.js
Outdated
_setRequired(element, isRequired) { | ||
if (isRequired) { | ||
element.setAttribute("required", "true"); | ||
element.setAttribute("aria-required", "true"); | ||
} else { | ||
element.removeAttribute("required"); | ||
element.setAttribute("aria-required", "false"); | ||
} | ||
} |
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.
Note that setAttribute
will do string conversion automatically, see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute#parameters, hence this could perhaps be formatted like so:
_setRequired(element, isRequired) { | |
if (isRequired) { | |
element.setAttribute("required", "true"); | |
element.setAttribute("aria-required", "true"); | |
} else { | |
element.removeAttribute("required"); | |
element.setAttribute("aria-required", "false"); | |
} | |
} | |
_setRequired(element, isRequired = false) { | |
if (isRequired) { | |
element.setAttribute("required", true); | |
} else { | |
element.removeAttribute("required"); | |
} | |
element.setAttribute("aria-required", isRequired); | |
} |
} | ||
}, | ||
{ "id": "bug1724918", | ||
"file": "pdfs/bug1724918.pdf", |
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 file is not included in the patch.
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.
r=me, with passing tests; thank you!
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 1 Live output at: http://54.241.84.105:8877/30b06e089c4ad6f/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 1 Live output at: http://54.193.163.58:8877/7266bc02a0dee6e/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/30b06e089c4ad6f/output.txt Total script time: 26.16 mins
Image differences available at: http://54.241.84.105:8877/30b06e089c4ad6f/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/7266bc02a0dee6e/output.txt Total script time: 28.73 mins
Image differences available at: http://54.193.163.58:8877/7266bc02a0dee6e/reftest-analyzer.html#web=eq.log |
- it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1724918; - it applies for both Acroform and XFA.
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/5a6c293e5a41f7d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.193.163.58:8877/58b5ef4b419080a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/5a6c293e5a41f7d/output.txt Total script time: 22.66 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/58b5ef4b419080a/output.txt Total script time: 21.86 mins
|