Skip to content
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

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Sep 19, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-22484

Changes

Description

  • Updated the companylogo template to add a proper text alternative
  • Added translations for those text alternatives

Screenshots & Video

After the changes proposed in this PR:
Screenshot from 2024-09-19 11-21-37

Executed Tests

None except manual tests (see screeshot above). Checked functional tests and it seems the selector for the element we modified is intact:

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.4.X
    • 15.10.X

…ean anything

* Updated the companylogo template to add a proper text alternative
* Added translations for those text alternatives
@Sereza7 Sereza7 added backport stable-15.10.x Used for automatic backport to 15.10.x branch. backport stable-16.4.x labels Oct 10, 2024
Copy link
Contributor

@michitux michitux left a 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>
Copy link
Contributor

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.

Copy link
Contributor Author

@Sereza7 Sereza7 Oct 23, 2024

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
Copy link
Contributor

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:

  1. 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?
  2. 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.
  3. 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Yeah, company is definitely off, orglogo could work too. Implemented your suggestion in 34c40f8 👍
  2. 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 that wiki is not always what the end user sees. Reverting this change to go with your suggestion in defdf3d 👍
  3. 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 :)

@Sereza7 Sereza7 marked this pull request as draft October 11, 2024 14:47
…ean anything

* Updated the translation keys to avoid using `companyLogo`
…ean anything

* Updated the translation value of the anchor alternative text
@Sereza7 Sereza7 marked this pull request as ready for review October 23, 2024 16:15
@Sereza7 Sereza7 removed the backport stable-15.10.x Used for automatic backport to 15.10.x branch. label Oct 31, 2024
Comment on lines 50 to 54
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'))"/>##
Copy link
Contributor

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.

Copy link
Contributor Author

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 :)

@michitux michitux merged commit 3dfbed1 into xwiki:master Nov 6, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Nov 6, 2024
…ean anything (#3510)

* Updated the companylogo template to add a proper text alternative
* Added translations for those text alternatives

(cherry picked from commit 3dfbed1)
michitux pushed a commit that referenced this pull request Nov 6, 2024
…ean anything (#3510)

* Updated the companylogo template to add a proper text alternative
* Added translations for those text alternatives

(cherry picked from commit 3dfbed1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants