Live data from Hacker News

Next.js 13

nextjs.org

81–90 of 106 posts

Re: Next.js 13

#81
post #13

Earlier quoted context omitted.

You should still be able to use alt="" to indicate that it is "decorative" and not meaningful imagery for a visually-impaired user.

Instead use the ARIA tag role="presentation": https://developer.mozilla.org/en-US/docs/Web/Accessibility/A... to indicate when an element has no semantic meaning and is purely visual.

Which of these tags you should use and what they should contain is entirely context dependant.

That said, the use of empty alt tags is generally discouraged and not even allowed together with the ARIA presentation role in most cases.

This decision of theirs will steer developers towards non-compliant/asemantic code. It's really stupid.

https://html.spec.whatwg.org/multipage/images.html#alt

https://w3c.github.io/aria/#presentation

https://w3c.github.io/aria-practices/#presentation_role

Re: Next.js 13

#82

Earlier quoted context omitted.

If you have no alt attribute, then screen readers read the URL! Empty strings are the way to go for decorative images

What if I have an app that no screen reader will ever read?

Then write your own component that extends and removes the requirement. Until then, web tooling is better off explicitly acknowledging that accessibility is an explicit goal.

Re: Next.js 13

#83
post #57
post #36

Earlier quoted context omitted.

it's a new "hook", https://vived.io/new-hook-is-coming-to-react-frontend-weekly... https://github.com/reactjs/rfcs/pull/229 contain some discussion

But `use` is still just in the RFC phase, right? How can Next.js already be (committing to) using it?

They’re essentially both in beta, but for something like this, React needs a proving ground - hence it’s being used in Next’s beta functionality

Re: Next.js 13

#84
post #61

Earlier quoted context omitted.

>On an application with 3,000 modules, Turbopack takes 1.8 seconds to boot up, while Vite takes 11.4 seconds. How many apps are dealing with 3,000+ modules?

At the pace the javascript ecosystem is going, by next year it will be almost all of them. Create react app for a new default project pulls in 1400 packages, 300 MB in size, just to put a hello world page on a screen. That nobody thinks this is absolutely bonkers drives me absolutely bonkers.

[deleted]

Re: Next.js 13

#85
post #61

Earlier quoted context omitted.

>On an application with 3,000 modules, Turbopack takes 1.8 seconds to boot up, while Vite takes 11.4 seconds. How many apps are dealing with 3,000+ modules?

At the pace the javascript ecosystem is going, by next year it will be almost all of them. Create react app for a new default project pulls in 1400 packages, 300 MB in size, just to put a hello world page on a screen. That nobody thinks this is absolutely bonkers drives me absolutely bonkers.

Plenty of people think it's bonkers and the informed frontend perspective is to not use CRA anymore: https://www.youtube.com/watch?v=7m14f0ZzMyY

Re: Next.js 13

#86

Earlier quoted context omitted.

The HTML spec says it is required, even if you don’t think it should be required it is. https://html.spec.whatwg.org/multipage/images.html#alt

NextJS could just create alt="" when rendering the HTML element from their element.

Frameworks shouldn't be changing the content you coded on the sly, that's just asking for trouble. Imagine trying to debug that.

Re: Next.js 13

#87

Earlier quoted context omitted.

The HTML spec says it is required, even if you don’t think it should be required it is. https://html.spec.whatwg.org/multipage/images.html#alt

NextJS could just create alt="" when rendering the HTML element from their element.

[deleted]

Re: Next.js 13

#88
post #81

Earlier quoted context omitted.

Instead use the ARIA tag role="presentation": https://developer.mozilla.org/en-US/docs/Web/Accessibility/A... to indicate when an element has no semantic meaning and is purely visual.

Which of these tags you should use and what they should contain is entirely context dependant. That said, the use of empty alt tags is generally discouraged and not even allowed together with the ARIA presentation role in most cases. This decision of theirs will steer developers towards non-compliant/asemantic code. It's really stupid. https://html.spec.whatwg.org/multipage/images.html#alt https://w3c.github.io/aria/…

That second link from W3C gives this very example:

https://w3c.github.io/aria/#example-13

"In the following code sample, the containing img and is appropriately labeled by the caption paragraph. In this example the img element can be marked as presentation because the role and the text alternatives are provided by the containing element."

So empty alt tags are not discouraged.

Re: Next.js 13

#89
post #35

Earlier quoted context omitted.

> I'm going to use Next.js just based on how well written this documentation is. I Understand the euphoria, but this is a pretty bad take.

Is it? Give me an example of a poorly documented yet wildly popular and good software tool built in the last 10 years (No Stockholm Syndrome for old tools allowed!).

The opposite would be a more interesting example to argue against the original statement.

Re: Next.js 13

#90
I'm pleased to see cumulative layout shift (re self-hosted fonts) advertised as a feature, this is the right kind of user-centric development, indeed the small details like these go a long way in improving user experience.
Post reply on HN