-
Notifications
You must be signed in to change notification settings - Fork 721
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
vpat 37: run JS aria edits + localization #4021
Conversation
abaevbog
commented
Apr 18, 2024
- added aria label to the code editor field
- to add the aria-label and keep everything consistent, load zotero.ftl and moved remaining hardcoded strings to .ftl file
@@ -239,6 +239,19 @@ rtfScan-complete-page = | |||
|
|||
rtfScan-complete-page-description = Your document has now been scanned and processed. Please ensure that it is formatted correctly. | |||
|
|||
runJS-title = Run Javascript | |||
runJs-code = Javascript code editor |
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.
The duplicate string with different capitalization is confusing me here - if we're using this string only as a variable within the FTL, we should prefix it with a -
(as in -brand-short-name
) and give it a more distinctive name.
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.
Oh yeah, different capitalization was my a typo but the ftl indeed ended up being unnecessarily complex. I did some refactoring so no need for duplicate values or variables now
@@ -239,6 +239,16 @@ rtfScan-complete-page = | |||
|
|||
rtfScan-complete-page-description = Your document has now been scanned and processed. Please ensure that it is formatted correctly. | |||
|
|||
runJS-title = Run Javascript | |||
runJS-editor-label = Javascript code editor |
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.
JavaScript!
runJS-title = Run Javascript | ||
runJS-editor-label = Javascript code editor | ||
runJS-run = Run | ||
runJS-help = Help |
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.
"Help" can be a general-
string.
</nav> | ||
|
||
<main> | ||
<div class="textbox-container"> | ||
<div class="textbox-header"> | ||
<label class="textbox-label" for="editor-code">Code:</label> | ||
<label id="run-as-async-label" for="run-as-async"> | ||
<label id="code-editor-label" data-l10n-id="runJS-editor-label" class="textbox-label"></label> |
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.
Revert. "Code:" should be localized, but it is fine as a label. This is a developer tool called "Run JavaScript". It's obvious what "Code" means.
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.
Makes sense. In all VPAT issues, the degree to which the labels are descriptive is brought up very often, which is where my "Javascript code editor" came from. But as a rule of thumb, I guess it's better to not change existing labels at this point and we can always revise them later if the VPAT review indicates that it's necessary. I pushed these little tweaks
- added aria label to the code editor field - to add the aria-label and keep everything consistent, load zotero.ftl and moved remaining hardcoded strings to .ftl file
Instead of setting both the editor's label and the aria-label on the actual editor, just set in on the label use aria-labelledBy on the editor to point at the label. It makes the .ftl entries more concise
- brought back "Code:" as the label of the code editor - make "Help" a general- variable - JavaScript case
Merged |