Skip to content

[SSR] aria-* attributes of dynamic null/undefined values render as strings #4788

Open
@nolanlawson

Description

@nolanlawson
<div aria-label={dynamic}></div>
<x-child aria-label={dynamic}></x-child>

As demonstrated in #4787, if dynamic is undefined, then this renders (in engine-server):

<div></div>
<x-child aria-activedescendant="undefined"></x-child>

And for null:

<div></div>
<x-child aria-activedescendant="null"></x-child>

This is inconsistent at best and wrong at worst. We should probably omit the attribute in both cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions