Skip to content

Feat: improve File component for accessibility and add more styling options #2026

@jiromaykin

Description

@jiromaykin

User story

Open Inwoner (OIP) is using the Den Haag 'File' component. This component could be improved for accessibility and is missing some styling/values. An overview with suggested improvements (as already implemented by OIP itself) can be found in the NLDS discussions here: https://github.com/orgs/nl-design-system/discussions/347#discussioncomment-16208598
This feature request collects the different findings from there.

Describe the solution you'd like

Here is a collection of our findings so that you can choose any of these, or even all of them if this agrees with accessibility research:

design-tokens:

  • add a border-radius token, we use rounded borders but there is no design-token for .denhaag-file -> border-radius
  • add tokens to style the extension text

HTML/structure

CSS/styling

Describe alternatives you've considered

We are only using the tokens and CSS from Den Haag (so not the React component), and have rebuilt the structure as a Preact/web-component Div ourselves, but still using the same class-names and design-tokens.
If we needed more structure or styling, we added the oip- prefix to these elements.

Additional context

OIP added the Den Haag File component to NLDS Themes repo here: nl-design-system/themes#1353
and added an Utrecht status badge here: nl-design-system/themes#1381

UPDATE: new feedback from accessibility officer April 9th 2026:

"...Voor een screanreadergebruiker is het vooral belangrijk dat alle context aanwezig is op het interactactieve element. Of dan het klikbare gebied vergroot is, of het hele component klikbaar is, maakt an sich niet zo veel uit.

In die van Den Haag mist nu de informatie 'Download' en wordt alleen de bestandsnaam meegegeven. Daarnaast is de tekst Download nog wel bereikbaar met de pijltoetsen (maar niet via de pijltoetsen met een screenreader), dus daar gaat ook iets mis...."

Acceptance criteria

  1. When we implement the File component in our project, it needs to have the same border-radius as all our other elements,
  2. The 'delete button' behaves like a true button so that screenreaders can detect it as separate from the whole File element and give feedback on its javascript functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds refinementThis story needs more information or needs to be scoredtriageNeeds to get a priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions