yamada-ui / yamada-ui

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion.
https://yamada-ui.com
MIT License
810 stars 216 forks source link

`main` tag is used in `Popover` component #1234

Closed hirotomoyamada closed 6 months ago

hirotomoyamada commented 7 months ago

Which package has an issue?

@yamada-ui/react

Package Version

1.3.4

Description

There should be only one main tag in a document.

https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element

Link to Reproduction

No response

Steps to Reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Browser

None

Operating System

Do you know how to fix the issue?

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix?

None

Additional Information

export const PopoverBody = forwardRef<PopoverBodyProps, "main">(
  ({ className, ...rest }, ref) => {
    const { styles } = usePopover()

    const css: CSSUIObject = {
      display: "flex",
      flexDirection: "column",
      alignItems: "flex-start",
      ...styles.body,
    }

    return (
-      <ui.main
+      <ui.div
        ref={ref}
        className={cx("ui-popover__body", className)}
        __css={css}
        {...rest}
      />
    )
  },
)
KekmaTime commented 7 months ago

@hirotomoyamada i can work on this issue

hirotomoyamada commented 7 months ago

@KekmaTime

Hi, thanks for the comment!

Yes, pls!