Aman Singh (@amn_sngh) profile picture

If programming is hard, you're doing it wrong.

Sydney, New South Wales
Joined April 2016
Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)Photo by Aman Singh (@amn_sngh)
Continued with our journey of creating an accessible Modal component in React part 2. - Focus placement when the modal is open - Returning focus to the element that invoked it - Closing modal when the `Esc` key is pressed - Focus trap - Scroll Lock amanexplains.com/how-to-crea…
1
3
96
Aman Singh retweeted
:has() + container queries = the component-based logical styling we've always dreamed of 😍 In this demo: 🖼 If the card has an image: make the font smaller & at < 400px wide, stack it ✨ If no image: bigger font, no stacking codepen.io/una/pen/oNpoqGp ⚠️ Need flags on in Canary
21
156
15
1,063
Have you ever had trouble understanding how HTML elements are stacked? What role does `z-index` play? I wrote a small article unveiling the stacking rules for the HTML elements. This will aid in your journey of demystifying how z-index works. amanexplains.com/stacking-ru…
Do not use aria-hidden on content that can be focusable (including tabindex=-1) But tbh, think really hard about using aria-hidden in general. Why are you specifically trying to hide visible content from AT users? Sometimes it is necessary. Many times it is incorrectly used.
3
10
1
30
🧪 Use CSS numeric factory functions instead of string concatenation to set style unit values. developer.mozilla.org/en-US/…
8
107
9
585
Personal take: a lot of things would suck less if design systems and JS frameworks weren’t so tightly coupled.
15
60
17
382
Aman Singh retweeted
The new React docs are out! Well-written and practical, complete with interactive examples, diagrams, and more. Plus, they teach Hooks first. Give them a read and provide feedback: beta.reactjs.org
38
458
55
2,522
Safari now supports `enterkeyhint`. 👏 I always like it when the enter key gives me more context. 👇 🔗 Spec: html.spec.whatwg.org/multipa… #devsheets
14
848
45
2,903
Accessible Authentication and Redundant Form entry are some interesting success criterion being added in the new WCAG 2.2. Web should be inclusive and accessible to everyone. visionaustralia.org/services…
1
Aman Singh retweeted
#1: Know the 8 ways to handle state, and when to consider each.
7
45
4
410
I just registered for PWA Summit 2021 ti.to/pwasummit/2021
1
Just got my ticket for #nextjsconf by @vercel, claim yours! Let's make the Web. Faster. nextjs.org/conf/tickets/oct2…
1
Aman Singh retweeted
Create image carousel using 2 lines of CSS. 🚀📷 🖇 codepen.io/prathkum/pen/bGBO…
47
339
19
1,921
Clever! Love this #CSS tip 👇🏻
CSS trick to dynamically reduce the line-height as the font-size grows, large texts need condensed line-height
3
39
296
Aman Singh retweeted
The Big Gotcha With Custom Properties css-tricks.com/the-big-gotch…
4
21
3
95
Creating an accessible component is not as hard as you think. It only requires the right attitude and a bit of empathy for your users. Written an article for my fellow react developers, but the idea can be applied to vanilla JS implementation too. amanexplains.com/how-to-crea…
Vim is probably the only text editor with the :smile command! :) :: masteringvim.com ::
3
13
65