AngularJS web client has invalid lang attributes

Bug #1802593 reported by Jane Sandberg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.1
Fix Released
Medium
Unassigned
3.2
Fix Released
Medium
Unassigned

Bug Description

Steps to re-create:

1) Go to https://demo.evergreencatalog.com/eg/staff/
2) View the source.
3) Note that the lang attribute of the <html> tag is en_us. This is invalid, since underscores aren't allowed in language codes. It should be en-us, with a hyphen instead.

The OPAC appears to be correct, and the ang6 client also seems to have valid language codes.

I checked this in 3.2 and 3.1.

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Adding the accessibility tag because of this explanation of this explanation of its accessibility ramifications: https://dequeuniversity.com/rules/axe/3.1/html-lang-valid

tags: added: accessibility
Revision history for this message
Shula Link (slink-g) wrote :

Confirmed.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Shula Link (slink-g) wrote :

Possible fix pushed to user/slink/LP1802593_angular_js_web_client_invalid_lang_attributes.

Thanks!
Sam

tags: added: pullrequest
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks for the patch, Sam. Your approach was good, but it seems like it broke the language picker in the Web staff client.

Here's a branch with another approach: LP1802593_angular_js_web_client_invalid_lang_attributes

Here is a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/LP1802593_angular_js_web_client_invalid_lang_attributes

Rather than doing the formatting in the EgWeb perlmod, this branch takes advantage of the ctx.eg_locale variable that EgWeb is already kind enough to offer us.

Changed in evergreen:
importance: Undecided → Medium
assignee: Jane Sandberg (sandbej) → nobody
milestone: none → 3.3.3
Revision history for this message
Galen Charlton (gmc) wrote :

I agree with using ctx.eg_locale. Jane's patch works for me; signoff pushed to user/gmcharlt/lp1802593_signoff.

tags: added: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

I've gone ahead and pushed this to master, rel_3_3, rel_3_2, and rel_3_1. Thanks, Jane and Sam!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.