Skip to content

fix(www): validation errors#4579

Merged
mimarz merged 11 commits intomainfrom
fix/www-validation-warning
Mar 13, 2026
Merged

fix(www): validation errors#4579
mimarz merged 11 commits intomainfrom
fix/www-validation-warning

Conversation

@oddvernes
Copy link
Copy Markdown
Collaborator

@oddvernes oddvernes commented Mar 5, 2026

resolves #4578

The issue was AvatarStack being figure and then nested inside span (that is display: flex anyway).
Changed span to div.
Not sure if perhaps the underlying element for avatarstack should be span instead to avoid others running into this problem 🤔
Edit: I have changed the underlying element in AvatarStack to span. It makes no difference other than now it won't fail html-validation for users putting it inside an outer span.

The other issue is we wrap a link around the avatarstack to anchor link to the authors at the bottom of the page, but we also have automatic tabindex on the avatarStack, which is not allowed even if it is set to -1. Fixed by setting it to undefined instead of -1 in the component, and not use expandable where it is wrapped in a link.

Fixed the other issues of wrong heading level, properly url-encoded feedback urls, and divs inside a button in themebuilder

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 0b8bbca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@digdir/designsystemet-react Patch
@digdir/designsystemet Patch
@digdir/designsystemet-css Patch
@digdir/designsystemet-types Patch
@digdir/designsystemet-web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@oddvernes oddvernes changed the title Fix/www validation warning Fix(www): validation errors Mar 5, 2026
@oddvernes oddvernes changed the title Fix(www): validation errors fix(www): validation errors Mar 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Preview deployments for this pull request:

storybook - 12. Mar 2026 - 16:21

themebuilder - 12. Mar 2026 - 16:22

www - 12. Mar 2026 - 16:28

@Febakke
Copy link
Copy Markdown
Member

Febakke commented Mar 6, 2026

I tested with a validation tool on some random pages to see if there was more that should be fixed. Most pages had none. But I found some other cases we can consider fixing.

/intro

  • Jumping over a heading level. h1 on "Introduksjon" to h3 on the cards.

/code/cli-config

Skjermbilde 2026-03-06 kl  07 31 00

Im guessing the <div> inside <code will be a lot of places.

Mønster/merking av lenker

Skjermbilde 2026-03-06 kl  07 34 04

Themebuilder

Skjermbilde 2026-03-06 kl  07 42 48

@oddvernes
Copy link
Copy Markdown
Collaborator Author

Im guessing the <div> inside <code will be a lot of places.

This is indeed 3rd party stuff to preview code and out of reach for us unfortunately

@oddvernes oddvernes marked this pull request as ready for review March 12, 2026 15:24
@mimarz mimarz merged commit e7b04c3 into main Mar 13, 2026
24 checks passed
@mimarz mimarz deleted the fix/www-validation-warning branch March 13, 2026 11:35
@github-actions github-actions bot mentioned this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML validation issues on WWW

4 participants