This is a meta-issue for the integration of the concept of 'language of parts' in Drupal core. Language of parts is an accessibility requirement in WCAG and is meant to make language changes in texts detectable.

"3.1.2 Language of Parts: The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text. (Level AA)" http://www.w3.org/TR/WCAG20/#meaning-other-lang-id

The recommended solution is to use the lang-attribute, for example:
<span lang="de">Ich bin ein Berliner</span> is a quotation from a speech by President John F. Kennedy.

This year in the Netherlands 45% of governmental websites fails on WCAG tests for this issue. Example: A governmental web page that should have language tags.

We discussed this in the last meeting in the accessibility group. As texts are provided in a lot of places, we suggested to break this issue into separate issues for the different levels and uses. First test and if needed file issues for the most common places like text fields.

General UI:
#1164682: links with a known language need language identifier
#1165476: if t() string has no translation or fallback language, text should have lang attribute

body field
The default Basic HTML format outputs the language attribute correctly and even transforms it to both xml:lang and lang. However, by default it is not possible to include span, p and div tags. That means that there is at the moment no option to include languages without additional visual markup (as cite, em, strong, blockquote etc).
#1322906: Allow span tag by default for language changes?
#1328768: attributes 'xml:lang' and 'xml:id' transform to 'lang' and 'id' in filter_xss
#1993928: Language of parts: Introduce a language toolbar button
#3174111: Automatically enable the language toolbar button on multilingual sites

text field
For text fields the default plain text format is not sufficient, an html filter should be included to output the language attribute.
#784672: Allow text field to enforce a specific text format

file field
Support language of parts for file description
#3163915: Support language of parts for file description

title field
Titles accept only plain text. There is no easy solution for this. Fix would be to have titles as text fields.
#1188394: Make title behave as a configurable, translatable field (again)

nodes/entities
#1164926: Nodes need to have languages specified separately for accessibility
#2036277: Language attribute is not attached to node title on a full page view

comments
#1368410: When viewing a node in another language as interface language, comment form should have correct language

views
#2496223: Views containing content not in the page's language need to add tags which mark the language of parts

See also:
#1165466: Language of parts, accessibility and multilanguage: language button
#724128: Impossible to add "xml:lang" in a translatable field
discussion http://groups.drupal.org/node/145894

Comments

Hanno’s picture

Issue summary: View changes

issues added

Gábor Hojtsy’s picture

Issue tags: +D8MI
Gábor Hojtsy’s picture

Issue summary: View changes

changed duplicate issue of html in titles

Hanno’s picture

Issue summary: View changes

adding levels

Hanno’s picture

Issue summary: View changes

53%>45%

Hanno’s picture

Issue summary: View changes

added issue xml:lang

Hanno’s picture

Issue summary: View changes

added info about filter formats

Hanno’s picture

Issue summary: View changes

.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Status: Active » Closed (duplicate)
Issue tags: -D8MI +D8MI-meta

Dismantling meta issues to clean up the D8MI issue list. (Working on a better overview for the issues).

Pancho’s picture

Title: META: integrate 'language of parts' in Drupal » [meta] Comply with WCAG guideline 3.1.2: Language of Parts
Status: Closed (duplicate) » Active
Issue tags: -wcag2 +wcag

@Gábor:
Is it okay to reopen and this issue?
We need to have an overview on what is needed to fulfill WCAG 2.0 Guideline 3.1.2. It seems to be one of the most trickiest aspects for AA conformance. Adding this on #2034915: [meta] Track progress in WCAG 2.0 conformance.
If you want we can remove the D8MI-meta tag.

Pancho’s picture

Issue summary: View changes

.

Pancho’s picture

Pancho’s picture

Pancho’s picture

Charles Belov’s picture

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mgifford’s picture

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andrewmacpherson’s picture

Title: [meta] Comply with WCAG guideline 3.1.2: Language of Parts » [meta] Conform to WCAG Success Criterion 3.1.2: Language of Parts
Version: 8.6.x-dev » 8.8.x-dev

Correcting terminology in issue title. "Comply" doesn't appear anywhere in WCAG.

This plan is worth bumping. It identified lots of child issues, which haven't seen any progress.

I recently filed #3049122: Links in language switcher block do not conform to WCAG language-of-parts too.

Now that the Umami demo profile has content in two languages (with more being considered), we'll have an easier time trying out patches.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Charles Belov’s picture

Issue summary: View changes
Charles Belov’s picture

Issue summary: View changes
Charles Belov’s picture

Issue summary: View changes

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

mgifford’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Charles Belov’s picture

Issue summary: View changes

"Filtered HTML format" in Drupal 7 is now called "Basic HTML format" in Drupal 10, if I am understanding this correctly. I have made this change to the Body section.