DEV Community

Kern Designs
Kern Designs

Posted on

1

Web Component Considerations

I am working on a new project. Basically, I'm writing a web component that works as a car. There will be a header in a block, body, and an icon. When you are building a web component there are a lot of considerations to take into account, especially accessibility ones.

Design consideration

When were designing you have to decide what you want the object to do. For this card I wanted to allow the user to customize it well. I want to allow for changing the header, background colors, icons, body content, and size. The body content should be able to have lists, links, and buttons.

Accessibility Concerns

In order to account for non visual users it has to be accessible via keyboard. This means that any buttons inside of the card can be tabbed to. The icon needs alt-text so you know what the icon is. Any text inside should render for the screen reader as well as a translator for different languages. It also needs to support color contrast and dark modes for visually impaired users.

Expected Difficulties

Even though I haven't done much with the card yet I can look forward to what I expect to happen. I don't think the changing of properties will be very hard. The title, color and body shouldn't be hard. Changing the button inside may come with complications, especially if we want it to be tabable. I am mostly concerned with the translations. I believe that will be difficult to do.

Helpful Skills

Luckily, I have some experience in this area. I recently made a button and that was tabable. This should help with those problems in the case that they occur. I also have made dark modes for projects before and would love to implement that into the card.

Thanks for reading! Follow along with the repository here!

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️