nl-design-system / backlog

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

Documentation: Fieldconventions #111

Closed macedvisioned closed 5 months ago

macedvisioned commented 3 years ago

Convention for use prefix datatype in fieldnames: Fieldnames need to have the right convention voor re-use data exchange to backend office systems.

WCAG succescriteria for forms are: Guideline 1.1, 1.3, 1.4 (m.u.v. 1.4.1), 2.1, 2.2, 2.4, 2.5.2, 2.5.3, 3.1, 3.2, 3.3 en 4.1 See link.

Aria criteria: See the following link.

Description: For unified reasons use prefixes per datatype of forms and written in CamelCase description or with an underscore between prefix, name and subname.

Use when: Unified reason is for better for export data for background processes and backoffice application use.

Don’t use the following characters: '-' because this will occur unexpected issues when using fields in calculations 'spaces' because this will generate 3 spaces in an URL of the webform. Each space will generate 3 characters e.g. '%2F'

Convention use: Text field: Prefix: txt[UnderstandableName]

Integer field: Prefix: num[UnderstandableName]

Checkbox: Prefix: cb[UnderstandableName] Avoid multi checkboxen. See comment at the multi lists.

Radiobuttons: Prefix: rb[UnderstandableName]

Dropdownlists: Prefix: dl[UnderstandableName] Bij voorkeur een default per land instellen boven in of bij complexe lijsten groeperen echter is deze laatste nog niet getest in screenreader modus.

Textareas: Prefix: txt[UnderstandableName]

Multilists: Prefix: list[UnderstandableName] Avoid using multiple-select menus. Not all browsers provide intuitive keyboard navigation for them. Many users do not know to use Control/Command or Shift + click to select multiple items. A group of checkboxes provides similar functionality in a more accessible way. See the following link.

Section/Group: Prefix: subForm[UnderstandableName]

Buttons: Prefix: btn[SubmitNaam], btn[ResetNaam], btn[SaveNaam] or btn[PrintNaam]

Searchbutton: Prefix: btn[SearchNaam] Always use a lableName

DateField: Prefix: dd[UnderstandableName]

Robbert commented 3 years ago

Waar gaat dit precies over? Over hoe je het <input name="..."> attribuut invult?

Hoe belangrijk is een name attribuut vergelijking met het moderne autocomplete attribuut?

macedvisioned commented 3 years ago

Dit gaat over de fieldnames. Heb ik besproken met Rogier. Het is een algemene conventie, per component komen ook de codefragmenten.

Robbert commented 3 years ago

Okay...

@usethetics Waar gaat dit precies over? Over hoe je het <input name="..."> attribuut invult?

usethetics commented 3 years ago

Aangezien er nog onduidelijkheden zijn over deze issue en het voornamelijk een development issue betreft stel ik voor om een meeting hierover in te schieten om duidelijkheid te krijgen hierover. Ik contacteer jullie even per e-mail hierover.