Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Img): correct the docs about the role usage #3595

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {

The image element associated with the class `dnb-img` does not have much opinionated styling. It exists more to have a future possibility to optimize and add features.

As of now, the React image "element" (Img) does provide a `figure` element with the `role="img"` and an `img` tag inside. This is mainly to support the [Skeleton](/uilib/components/skeleton) provider.
The React image "element" (Img) does provide a `figure` element with an `img` element inside. This is mainly to support a `caption` text and a [Skeleton](/uilib/components/skeleton).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The React image "element" (Img) does provide a `figure` element with an `img` element inside. This is mainly to support a `caption` text and a [Skeleton](/uilib/components/skeleton).
The React image "element" (Img) provides a `figure` element with an `img` element inside. This is mainly to support a `caption` text and a [Skeleton](/uilib/components/skeleton).

Should we maybe change "The React image element" to "The Eufemia image element" or is that silly? 😅


```jsx
import { Img } from '@dnb/eufemia'

render(<InlineImg alt="..." src="..." width="100" height="100" />)
render(<Img alt="..." src="..." width="100" height="100" />)
```

## Basic image element
Expand Down
Loading