nl-design-system / backlog

Central product backlog of the NL Design System.
European Union Public License 1.2
7 stars 1 forks source link

Best Practice: Content language #126

Closed macedvisioned closed 5 months ago

macedvisioned commented 3 years ago

Door @Yolijn even verduidelijkt

To ensure sceenreaders ability to read the language properly, it is necessary to include the language attribute to the document but also for all children that have a different language content within.

For example

<body lang="NL-nl">
  <h1>Welkom op onze website</h1>

  <p lang="en-GB">This paragraph is defined as British English.</p>
  <p lang="fr">Ce paragraphe est défini en français.</p>
</body>

Forms conventions are mentioned here

https://github.com/nl-design-system/backlog/issues/112

Design tips

https://webaim.org/techniques/language/

Use when: let the user know in which lange the form page is written

Pattern: -

Don't use: n.a.

Note:

-

Page language formatting according to WCAG guidelines

<!--Language instelling formulierpagina.-->
Mark up that in c# programming code language will be read <%<html lang="nl" xml:lang="nl">%> as phonetic text, write code that the percentage signs not will be pronounced.

<select name="ddlLanguage" onchange="javascript:setTimeout('__doPostBack(\'ddlLanguage\',\'\')', 0)" id="ddlLanguage" class="languagepicker" role="listbox" aria-label="Taal selectie">
    <option value="en-GB">English (United Kingdom)</option>
    <option selected="selected" value="nl-NL">Nederlands (Nederland)</option>

</select>
<!--End Language instelling formulierpagina.-->

Skiplink to go to the maincontent of forms

<!--Skiplink-->
<a href="#subheader" class="bypass" tabindex="0">Go to maincontent</a>
<!--End Skiplink-->

<!--end main-->

Robbert commented 3 years ago

This seems to be more of a pattern than a component. It would apply to entire pages as well, so I feel this should not be form-specific.

macedvisioned commented 3 years ago

Hi Robbert, Mooi dank je. Ik zocht trouwens naar patterns. In #112 had ik een aantal validaties gezet bij forms. Moet ik deze ook plaatsen bij patterns of is daar een ander onderwerp voor? Hoor graag, Ed

Robbert commented 3 years ago

@macedvisioned Je mag wel een "Pattern: form validation" issue aanmaken daarvoor, die hebben we inderdaad nog niet op de backlog.

Yolijn commented 1 year ago

Renamed this to best-practice as this is something someone should add themselves like #61 or #135

Yolijn commented 5 months ago

https://github.com/nl-design-system/backlog/issues/137