News for hackers. Stuff that matters.

enyo

Re: on Friday October 04, 2024 @11:03AM (#41742157)
A short introduction to Swift for web developers. It's not meant to be a learning resource, but highlights some of Swift's features and language decisions that are interesting coming from web development.

Show HN: Easy Color Palettes Generator for UI Design

https://www.pausly.app/blog/easy-gradient-palettes

Many UI tools and libraries offer gradient palettes for selecting shades to build UI interfaces.However, incorporating specific colors into these gradients can be challenging. To address this, we developed a simple gradient palette generator using Oklch, allowing for the creation of custom palettes.We decided to open source it and share it, in case it's useful to other people!Built with Svelte...

( Read More... | no comments | 3 points | on HN )
Re: on Tuesday May 16, 2023 @05:07AM (#35959297)
Learn how you can reap the benefits of TypeScript and still write plain JavaScript.
Re: on Monday May 15, 2023 @10:27AM (#35948701)
A short introduction on how to use JSDoc to type your JavaScript, and when it’s useful to use it instead of TypeScript.
Re:Accessible hamburger buttons without JavaScript on Saturday January 28, 2023 @03:33AM (#34556142)
Thanks! Could you please tell me if this is still happening (make sure to reload first) and if so, would you mind sending me the email address you used for signup to [email protected]?
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @01:32PM (#34549823)
You didn't actually say anything other than that it's bad and not to use on production. Care to elaborate?
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @11:33AM (#34547965)
The use of this symbol in the article is a placeholder. Obviously nobody would actually use this on their website...
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @11:28AM (#34547846)
Unfortunately there are still plenty of issues with the details element, especially around accessibility. Read more here: https://cloudfour.com/thinks/a-details-element-as-a-burger-m...

Hopefully this will change soon. I’ll amend the article when this will be the case.

Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @11:13AM (#34547629)
This would be way too frustrating to me :)
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @11:09AM (#34547594)
Mh.. yes I agree. "Expand menu" and “Collapse menu" is probably a better wording.
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @11:00AM (#34547491)
Oh you’re right, I forgot to add this in the article + codepen. (It’s how the button on the site itself is implemented and I forgot to integrate it)
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @10:52AM (#34547372)
> "but it did not become 'de facto' on small screens decades ago”

To me saying that something becomes something over a few decades doesn’t imply that it has been that way from the beginning. It has become a de facto standard over two decades doesn’t mean that it was a de facto standard two decades ago.

I feel like this is really not important, and I’ll change it to the last decade because it doesn’t matter. It’s definitely true that the adoption was most relevant in the last decade. I remember building hamburger menus over 20 years ago though.

What is more important is your second point that I sort of endorse hamburger buttons as a good UI element choice with this introduction. To me, this introduction was not meant to be controversial in any way. I believe that hamburger buttons are one of the most recognisable UI elements, and I don’t think that companies like Apple would use them without doing their homework.

That being said, it was not my intent to promote them as such. I didn’t do any profound research on the topic, and this article is not meant for user interface designers, but for developers that want or need to implement such a button because it either fits their use case or because the designers made the decision.

I’ll amend the intro to be more careful in the wording.

You came in a bit hot with your initial comment, but thanks for your feedback :)

Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @10:11AM (#34546889)
I never said that it did.
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @10:04AM (#34546807)
> Screen reader users do not need to open or close menus.

Agreed, but you don’t want keyboard accessible menu items available for users that aren’t visually impaired. Offering a “show menu” button to screen readers is not less accessible to them than skipping the navigation section.

If you’re building a page that is only meant to be used by screen readers, then you are absolutely right.

> Meanwhile, non screen reader users are forced to guess what will be behind the ≡ button this time.

The main menu? Which is behind the same ≡ button on most pages on the internet?

Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @09:49AM (#34546635)
That’s why the anchor gets the role=“button”. Unfortunately you can’t set the target of the page with a button (without JavaScript), that’s why an anchor link is used.
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @09:41AM (#34546535)
The icon was designed and introduced in 1981. The popularity dramatically increased in the last decade due to smartphones that’s for sure.

It’s used by Microsoft, Apple, Youtube... the list goes on. I think it’s not too much of a stretch to say that it is ubiquitous and familiar to users.

That being said, it's not the point of the article. There are definitely reasons not to use a hamburger button. But this article helps you build one if you want it.

Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @09:22AM (#34546315)
Thanks for letting me know! Seems to happen because it’s not a high dpi screen. I’ll get on it.
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @09:20AM (#34546298)
That is a terrible user experience for SSR though and will lead to a layout shift every time the page is loaded.

I wouldn’t really call this a CSS “hack” either. There is a checkbox that defines whether the menu is open, and CSS that styles the menu accordingly. I think that this is rather elegant really.

As soon as the :has pseudo class has widespread support, the checkbox can also just live inside the nav element, which removes the awkward general sibling combinator.

Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @08:57AM (#34546047)
Which image (and which browser)?
Re:Accessible hamburger buttons without JavaScript on Friday January 27, 2023 @08:48AM (#34545944)
Learn how to create an accessible hamburger button with pure HTML and CSS and why that is important.
Yup. Built with Svelte & Supabase.
That's the plan :) It currently links to Telegram, but next up is Slack integration.
I'm currently building a service for exactly this. It's still in Alpha but it allows you to take short 4-5min breaks with friends (+ voice chat) with instructed stretches + strength exercises. https://www.pausewith.me

As I said, still in Alpha, but I'm always happy for constructive feedback.

I thought that Josh Wardle found a great way to incentivise playing the game on a daily basis and thought that combining this with something useful like ear training would be a perfect fit.

I decided to deviate from the Wordle concept a bit because I realised that simply copying the concept didn't make that much sense given that there are only 12 notes (7 in easy mode). It would have been too easy to solve the melody without even listening to it.

The project is written in Svelte + Svelte Kit.

Because Dart is similar to JS, easy to learn, and better in regards to performance, tools and security. JS is a mess, just look at the equality operators and the fact that you can manipulate classes like String, etc...
Re:Stop writing stateful HTML on Tuesday November 25, 2014 @06:55AM (#8657340)
Thank you.

Older »