-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
XWIKI-22484: The alternative for the home link on the logo does not mean anything #3510
Conversation
…ean anything * Updated the companylogo template to add a proper text alternative * Added translations for those text alternatives
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.
Overall, this looks good, but as this is one of the first elements of the page, I think we could be a bit more careful regarding the wording (see individual comments).
@@ -46,7 +46,8 @@ | |||
#end | |||
#end | |||
<div id="companylogo"> | |||
<a href="$!xwiki.getURL($services.wiki.currentWikiDescriptor.mainPageReference)" title="Home" rel="home" #if(!$displayPageHeader)class="navbar-brand"#end> | |||
<img src="$!logourl" alt="Wiki Logo"/> | |||
<a href="$!xwiki.getURL($services.wiki.currentWikiDescriptor.mainPageReference)" rel="home" #if(!$displayPageHeader)class="navbar-brand"#end> |
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 don't think that removing the title from the link is good as it means that users won't get any hint anymore that the link points to the home page of the wiki when they're hovering the logo. I understand that the title attribute might not be enough for screen readers, but I think it would still be good to keep the title attribute, but maybe with the new translated text.
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.
My bad, I didn't realize this title was important for usability.
I added it back in a7411b8 👍
For AT, the title on a link might only get used if there's no other text alternative, so having it is not an issue.
@@ -752,6 +752,9 @@ core.footer.modification=Last modified by {0} on {1} | |||
## This label is only visible by AT users to help with understanding the meaning of the top section containing | |||
## the page title and the info about the last modification of the page. | |||
core.document.header.info.label=Page header | |||
## These two text alternatives are only visible by AT users. | |||
core.document.header.companylogo.anchor.text=Wiki home | |||
core.document.header.companylogo.logo.text=Logo of the wiki |
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'm wondering some things:
- Should we really use the name
companylogo
? I see that it is the ID of the container, but in my opinion it isn't really fitting as the wiki doesn't necessarily belong to a company. What about a shorter "logo" and then "image" instead of the "logo" for the second key? - Should we really name the text "Wiki home", why don't we keep the shorter "Home" that was the title previously? Asides from being shorter, there is also the aspect that from the perspective of the user, this website might not really be a wiki but some public, non-editable website.
- While the logo alternative text seems good enough, I wonder if we shouldn't offer an easy way to configure the alternative text next to the logo upload.
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.
- Yeah, company is definitely off,
orglogo
could work too. Implemented your suggestion in 34c40f8 👍 - My reason was that in the context of a browser, the
Home
is something else more generic and it'd be better to have something a bit more precise than this. I forgot thatwiki
is not always what the end user sees. Reverting this change to go with your suggestion in defdf3d 👍 - Created https://jira.xwiki.org/browse/XWIKI-22602 to track the progress on this idea 👍 For now, admins can still edit it with a translation, which is quite easy once they figure out the translation they need to edit :)
…ean anything * Added back the title
…ean anything * Updated the translation keys to avoid using `companyLogo`
…ean anything * Updated the translation value of the anchor alternative text
title="$escapetool.xml($services.localization.render('core.document.header.companylogo.logo.text'))" ## | ||
#if(!$displayPageHeader)class="navbar-brand"#end>## | ||
<span class="sr-only">$services.localization.render('core.document.header.companylogo.anchor.text')</span> | ||
<img src="$!logourl" ## | ||
alt="$escapetool.xml($services.localization.render('core.document.header.companylogo.logo.text'))"/>## |
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.
These translation keys don't match those that are defined in the translation file 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.
Addressed in a5ca06b 👍
Thank you :)
…ean anything * Updated the use of translations
Jira URL
https://jira.xwiki.org/browse/XWIKI-22484
Changes
Description
Screenshots & Video
After the changes proposed in this PR:
Executed Tests
None except manual tests (see screeshot above). Checked functional tests and it seems the selector for the element we modified is intact:
xwiki-platform/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/po/BasePage.java
Lines 112 to 113 in 0ddc451
Expected merging strategy