Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
tour.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Jun 2017 at 00:17 UTC
Updated:
5 Mar 2018 at 21:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
keeganstreet commentedComment #3
rliComment #4
nick_schuch commentedThanks for the patch keeganstreet!
You will need to modify the "tour.es6.js" instead as per https://www.drupal.org/node/2815083
Comment #5
nick_schuch commentedComment #6
keeganstreet commentedThanks @nick_schuch, I'm adding a new patch now for 8.4.x which includes the change in the ES6 source file.
Comment #7
mgiffordComment #8
Sumit kumar commentedHi Apply patch #6 on 8.4.x and its applied successfully.
working fine
Comment #9
larowlanLooks good to me
Comment #10
larowlanComment #11
gábor hojtsyWe need to translate these with Drupal.t()
Comment #12
dinesh18 commentedHere is an updated patch with Drupal.t()
Comment #13
larowlanWe lost the aria-label attributes.
We shouldn't be translating the whole string, just the 'Close' text.
So, probably best to evaluate
Drupal.t('Close')into a variable, and then use string concatenation+in JavaScript to use the translated text with the existing one.Comment #14
gábor hojtsyLooked if we have any prior art with context (because "close" could mean "nearby" as well :D) but apparently not, so we can assume people already translate this as “Finish” not “Nearby”.
Comment #15
dinesh18 commentedadded as per #13. Is it good so that I can create the patch
Comment #16
larowlanHi @Dinesh18 in Javscript, use + not . to concatenate.
Also, use close, not $close, as its a plain variable - not a jQuery reference
Comment #17
dinesh18 commentedThanks larowlan. Here is an updated patch.
Comment #18
dinesh18 commentedComment #19
rogierbom commentedComment #20
droplet commentedLet's clean up the ugly concatenation with ES6 template literals and drop the var.
Comment #22
naiduharish commentedModified patch by using template literal and const.
Comment #24
sim_1I wasn't able to apply the patch from #22 when I tried. I believe this is because the original files have changed.
I reapplied the changes manually and then tested with a screen reader. The close buttons read correctly when navigating via screen reader and the markup looked correct to me.
I wasn't able to create an interdiff because I couldn't apply the previous patch. The patch itself is unchanged, only the files it changes are different.
Comment #25
idebr commentedThis implementation does not pass our eslint coding standards:
/core/modules/tour/js/tour.es6.js
158:21 error Unexpected template string expression no-template-curly-in-string
https://eslint.org/docs/rules/no-template-curly-in-string
Comment #26
GrandmaGlassesRopeMan- Should be wrapped in backticks to be a valid template string.
Comment #27
idebr commentedScreenshot of DOM for good measure:
Comment #28
gábor hojtsyI was wondering how did "Close" become "close" between 17 and 22, I did not find commentary about it. As per my earlier grep from above, we consistently use uppercase labels for this (as usual in Drupal). This should be a minor update so we can get this land :) (I would not make this require JS testing personally, that would be shooting a sparrow with a cannon as we say in Hungary).
Comment #29
GrandmaGlassesRopeMan-
c->CComment #30
GrandmaGlassesRopeMan-
c->C- for real this time.
Comment #31
GrandmaGlassesRopeManComment #32
idebr commentedFeedback from #28 has been addressed in the patch in #30, updating status to RTBC.
Removing 'Needs JS testing' per #28
Comment #33
alexpottAdding review credits to everyone whose reviews affected the patch.
Comment #34
alexpottCommitted and pushed 987e147c0d to 8.6.x and d0af739e12 to 8.5.x. Thanks!
Backported to 8.5.x as a normal bugfix that improves accessibility and is low risk.