The documentation for the new /app directory support is not complete though. API routes seems to be not documented yet (or is it not implemented yet?) so I haven't ported mine and leave it on the /pages/api directory for now.
Next.js 13
91–100 of 106 posts
Re: Next.js 13
#92Edit: There's some more discussion about Turbopack at https://news.ycombinator.com/item?id=33333695 . Looks like they launched a webpack alternative called Turbopack today: > Next.js 13 includes Turbopack, the new Rust-based successor to Webpack. https://vercel.com/blog/turbopack https://turbo.build/pack
Sigh another one? I thought Vite was the new thing.
One recent offering I enjoyed working with was esbuild, as I could use it's CLI as part of my existing build system incrementally instead of planning my whole system around it.
Re: Next.js 13
#93Earlier quoted context omitted.
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
#94Not knowing anything about the new /app directory support, I'm able to migrate my static landing page in about two hours. The resulting page is definitely smaller and load faster than the previous version. Now I'm consistently getting 100 on page speed insight (mobile) while previously it's hovering around 98-99. The documentation for the new /app directory support is not complete though. API routes seems to be not d…
Re: Next.js 13
#95Earlier quoted context omitted.
Because that’s how screen readers know the image is decorative. It literally is/improves accessibility.
Additionally, the developer is more likely to actually write alt text when it's not decorative.
Re: Next.js 13
#96Earlier 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.
Re: Next.js 13
#97Earlier 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.
Re: Next.js 13
#98Earlier quoted context omitted.
It's often better to specify alt="" than not at all, because screen readers may use the filename instead if there's no alt attribute.
That's actually a detriment then, if the "fix" for no a11y makes screen readers think they should use no alt text, instead of some possibly meaningful alternate.
Re: Next.js 13
#99Earlier quoted context omitted.
Sigh another one? I thought Vite was the new thing.
I think the issue starts when xyz new tool requires you to write code specific to that thing, which is something I avoid as much as possible. IMO they should strive to stay out of the way as much as possible and just bundle/optimize/tree-shake and not worry about extending JS as a language or nodejs as a runtime or doubling as a build tool or a filewatcher or a development server etc etc (see the UNIX philosophy 'do…
1. Does code written a particular way?
2. Does it need to be configured?
3. Does it conflict with other tooling?
4. Does it have limitations that are too restrictive?
5. Does it cause bugs/issues that are difficult to resolve?
The ideal tool just does its thing, doesn't need any code written or configuration, works no matter what other tooling you're using, has no limitations, and will never itself cause a bug.
That might not be realistic to do 100%, but I think it's what all tools should be aiming for.
Re: Next.js 13
#100Earlier quoted context omitted.
That's actually a detriment then, if the "fix" for no a11y makes screen readers think they should use no alt text, instead of some possibly meaningful alternate.
The fix for no a11y is to add a11y. In many cases (i.e. the "often" specified by GP), images contain no extra information, in which case you should indicate that by adding alt="". In other cases, you should add an actual description.
If people don't care about a11y, they aren't going to start devoting time to it because a tool puts a slight roadblock in their way - they're just going to try to bypass the tool.