Skip to content

W3C div in span is not allowed #2764

@dutscher

Description

@dutscher

Hi there,

my page use your awesome package. I have server rendered react and the W3C validator shows me this error:

Error: Element div not allowed as child of element span in this context. 
(Suppressing further errors from this subtree.)

n--value'><div class='Select-value'><span

Contexts in which element div may be used:
Where flow content is expected.
As a child of a dl element.
Content model for element span:
Phrasing content.
Error: Element div not allowed as child of element span in this context. (Suppressing further errors from this subtree.)

pan></div><div aria-expanded="false" aria-owns="" aria-activedescendant="react-select-categoriesDropdown--valu…" class="Select-input" role="combobox" style="border:0;width:1px;display:inline-block" tabindex="0"></div>

Contexts in which element div may be used:
Where flow content is expected.
As a child of a dl element.
Content model for element span:
Phrasing content.

i've found the line where we could change the span to a div:
https://github.com/JedWatson/react-select/blob/master/src/Select.js#L1176

is this easily to fix or is the span necessary?

greetz dutscher

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions