Closed Bug 1474565 Opened 4 years ago Closed 2 months ago

Keep html lang attribute in Reader Mode

Categories

(Toolkit :: Reader Mode, defect, P3)

61 Branch
defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: gerhard.grossmann, Assigned: micha154)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [reader-mode-firefox-integration][reader-mode-readability-algorithm])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180703192103

Steps to reproduce:

With a click at the icon in the url bar you can switch from the original website to the simplified Reader Mode.


Actual results:

Sadly the Reader Mode (Firefox 61.0, Ubuntu Linux) strips the lang attribute of the html tag. So <html lang="de-de"> becomes <html>. Isn’t there a possibility to keep this attribute also in Reader Mode?


Expected results:

If the lang attribute was kept it would be possible to add hyphenation via userContent.css (my goal).
Component: Untriaged → Reader Mode
Product: Firefox → Toolkit
Thanks Gerhard, this seems like a pretty reasonable request, imo.
Priority: -- → P3
This'll need some changes to the actual readability library as well as the integration code in Firefox.

Note that we should probably add the attribute to the container of the readable content, not to the root, because although the content might be language X, the UI we add (the sidebar) may have a different language (e.g. when reading a German article in an English Firefox, or vice versa).
Whiteboard: [reader-mode-firefox-integration][reader-mode-readability-algorithm]
Blocks: 1211018
Duplicate of this bug: 1335268
Assignee: nobody → micha154
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The first part of this issue is being addressed by Emily in: https://github.com/mozilla/readability/pull/721

Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac638f002540
Adding lang attribute in Reader Mode. r=niklas,mtigley
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.