Skip to main content

Forced Colors support in Material UI

· 10 min read

miami downtown canals view A view of the Miami Downtown Canals

This post explains how Windows High Contrast mode is exposed through CSS forced colors, the gaps we found in Material UI’s component support, the implementation approaches we evaluated, and why we ultimately chose an opt-in theme enhancer.

The problem

Before Material UI v9.1.0, components generally behaved well with forced colors, but our audit identified several missing states.

The fixes fall into a few groups:

  • Form states: FilledInput, Input, OutlinedInput, FormLabel, FormHelperText, FormControlLabel, placeholders, and disabled native select icons.
  • Selection and navigation states: Autocomplete, MenuItem, ListItemButton, and ListItemIcon.
  • Disabled controls: Checkbox, Radio, Slider, and Switch.
  • Feedback, focus, and overlays: LinearProgress, ButtonBase, Tooltip, AccordionSummary, and ToggleButton.

If these cases are not visible in forced colors mode, users can lose access to state information: disabled, selected, focused, invalid, or in progress. The tricky part was not finding a way to style them.

Material UI has many styling entry points. The real challenge was choosing the right level of the system. The options we considered are documented in this post, as well as the solution we chose to fix the issues with minimal adoption effort and upgrade risk.

The following demo shows these affected states side by side.

Open the Material UI forced-colors demo in CodeSandbox.

Building a Reusable Roving Tabindex Strategy in React, Part 1

· 20 min read

a collection of limestone-karst islands, maya bay, thailand A collection of limestone-karst islands at Maya Bay, Thailand.

Sweet! But things are going to become more complex in a bit.

The Roving Tabindex pattern has been around for some time. It's a very useful pattern when it comes to collections of items that are actionable. Without it, each item in the collection is a tab stop, and if the collection is quite large, maybe more than 5 item large, keyboard users might experience frustration moving pass it. Also, it might be easier for keyboard users to just use arrow keys to move between items instead of using Tab or Shift Tab. For me, at least, it's faster and way more intuitive.

My 2025 in Review

· 8 min read

library from a cafe in chiang mai, thailand A library inside a cafe in Chiang Mai, Thailand.

3 trips instead of 12, but I would not change a thing about that.

Here we go again. This time only with a 2 month delay, so definitely improvement. 2025 has been for me a great year, even with a small setback that felt like a huge one at a time. Looking back, I am very grateful about everything that happened last year. It challenged me. It made me ask more questions. It made me know more about what's actually important to me. And it rewarded me far more than I ever hoped for.

First and most important: I'm getting married to the love of my life and my best friend! 3/10/2026 save the date! I cannot describe in words what this means to me as I look forward into the future. Feeling lucky is a big understatement.

I am also moving to a new place, which should be done in 2026, and I look forward to having more space for us and for our hobbies, as well as more light for my plants!

Overall, I ticked a lot of goals when it comes to my role as a Software Engineer. I worked on my hobbies, my routine and, of course, my trips!

Palermo 2024

· 6 min read

teatro massimo in palermo Teatro Massimo in Palermo.


If you are keeping a strict diet, avoid this place like the plague.

Sicily deserved a part 2 after the Catania trip, and Palermo was the natural next stop. It's also conveniently situated near the beach, as well as the nearby town of Cefalu, which was also on the trip list. We were so ready for a few days of Dolce Vita, andare in spiaggia, mangiare i cannoli and enjoying some ancient history combined with great scenery.

My 2024 in Review

· 9 min read

lago di garda view from riva View over Lago di Garda from Riva.

(...) it's the place I will remember for the rest of my life.

I've been meaning to write a yearly review, and I aim to stick to the plan. It's already June 2025 and 2024 came to a close quite a while ago. What can I say? I've been a bit busy, and maybe a bit uninspired. However, 2025 has been for me one of the best years in my life, and I've wanted to share a bit about it. There were some good parts, some not so good, and some that were actually amazing. I've met the love of my life, and for the first time ever, things have beginning to feel as they should have. I feel I'm in the right place and I'm excited for whatever comes next. I'm happy.

Tenerife 2024

· 11 min read

anaga view of the ocean Rural Park of Anaga view near the ocean.


There's also a Starbies on the promenade, perfect to sip on a Cold Brew while watching surfers just getting destroyed by the waves. Oh, bliss.

Surf's up! It was time for a much more longer trip, and the place we chose was Paradise. Tenerife does have a reputation. It's a go-to place for many Europeans, as it's not very far from home, it's warm, it's beautiful, and there's so much to do, from lying on the beach to hiking next to a volcano. Our hopes were higher than the volcano, honestly, and we were not prepared to be disappointed.

Bellagio 2024

· 6 min read

como lake view in lecco Lecco view of the Lake Como.


Just reading a book and enjoing a coffee. Niiice.

I've been contemplating of booking a cheap flight to Milan, only with a backpack, rent a car, drive all the way to Como to a hotel near the lake and stay for a couple of nights. And, while there, rent a bike, pack a sandwich and a San Benedetto, pick a couple of trails and don't look back. Maybe you should, too.

Found a nice hotel in Bellagio that had breakfast included, Seta. There was also a bike renting shop nearby, Bike It! Bellagio, and the best thing about it was that they had a website which contained a few bike trail suggestions, so it was easy to start the trip with minimum preparation. Bellagio, as a town is quite nice, but there was a lot of construction going around and there weren't many places to eat or have a coffee, at least I did not find any. That was not on the convenient side, but the main topic of the trip was biking, so I forgave the shortcoming.

Delivering the Feature

· 8 min read

the praetorian fountain in palermo The Praetorian Fountain in Palermo.

All stages in the software development lifecycle are important, but some stages are more important than others.

There are many important parts of the software development lifecycle. It's important to understand a business need, otherwise your feature won't be useful. It's important is to devise its requirements, create the designs, split the work and estimate it. Then comes the implementation, testing, delivering it to production and measuring its performance and usage through telemetry.

All stages in the software development lifecycle are important, but some some stages are more important than others. Is it true? Hard to say, maybe it depenends case by case. Are you a startup? A big tech company? Is there a similar product already on the market? There are many aspects to consider when you're prioritising.

We're not going to debate that here. Instead, I would like to advocate the importance of delivering the feature. If it's not being used by costumers, nothing else matters.

Athens 2024

· 5 min read

the odeon of herodes atticus The Odeon of Herodes Atticus.


But anyway, here I was, Syntagma square, baby.

Ever had that urge to just go some place, do nothing but eat, chill, have a few walks with some coffee in between. Well, folks, how about some Athens in February? After enjoying Madrid and Malaga in January and December, I developed quite a passion for Mediterranean destinations during winter. All I wanted was some place that was still warm, not that crowded but still offering relevant stuff to do. And Athens really hit the nail in the head on this one.

Also, as a side note, notice that I'm writing about my February trip at the end of September. I'm quite behind on this little travel blog I have going on, and I decided to cut my articles short. I'll focus only on the good stuff, throw some of the best pictures and I'll wrap it up sooner than expected. I'm not going aiming to turn this blog into the Song of Ice and Fire.

Calling Mandatory Getter props

· 11 min read

hilly landscape in the village of simon, brasov Hilly Landscape in the Village of Şimon.

...there's a lot going on with the attributes and the handlers and the ref and the other properties...

Let's assume that we have the following scenario. We have a custom hook that returns getter props, and we want to make sure that those getter props are called correctly. But, first things first: