Home Projects Portfolio Dashboard Export PDF Log in

Boosting UX and DX: Prioritizing Accessibility and Code Standards in GDGAranjuez

In the world of web development, it's often the subtle details that elevate a good project to a great one. For the AdoptaUnJuniorPlatform/GDGAranjuez project, recent reviews highlighted two critical areas for refinement: user interface accessibility and code consistency. Addressing these not only enhances the user experience but also streamlines the development workflow.

The Visual Hurdle: Ensuring Accessibility Through Color Contrast

One of the most immediate impacts on user experience is visual legibility. In our review process for AdoptaUnJuniorPlatform/GDGAranjuez, we identified instances where color contrast ratios, particularly in dark mode, fell below recommended accessibility standards. For example, using a very light text-purple-100 on a slightly darker bg-purple-800 background resulted in a contrast ratio of approximately 4.06:1. While seemingly minor, this can significantly hinder readability, especially for small text or users with visual impairments.

WCAG (Web Content Accessibility Guidelines) recommend a minimum contrast ratio of 4.5:1 for normal text. Ensuring adherence to this standard is crucial for creating an inclusive and comfortable user experience across all themes and screen sizes.

Consider this conceptual CSS example demonstrating the importance of contrast:

/* Poor Contrast Example */
.low-contrast {
  color: hsl(270, 20%, 90%); /* Light purple text */
  background-color: hsl(270, 40%, 30%); /* Darker purple background */
  font-size: 0.75rem; /* Small text */
}

/* Improved Contrast Example */
.high-contrast {
  color: hsl(270, 20%, 100%); /* Lighter purple text */
  background-color: hsl(270, 40%, 20%); /* Even darker purple background */
  font-size: 0.75rem;
}

The high-contrast example makes a subtle but significant adjustment to the background to ensure better legibility, particularly for smaller fonts often used in elements like tags or secondary information.

The Silent Contributor: Automated Code Formatting

Beyond what users see, how developers work together is equally vital. Inconsistent code formatting can introduce unnecessary friction during code reviews and reduce overall readability. Discussions arose around whether formatting changes were applied manually or through an automated tool like Prettier. Manual formatting can lead to diffs bloated with whitespace changes rather than actual logical modifications, making reviews tedious and increasing the chance of merge conflicts.

Automating code formatting ensures a consistent style across the entire codebase, regardless of who writes the code. Integrating a formatter into the development workflow (e.g., on file save, or as a pre-commit hook) eliminates manual effort and allows developers to focus on functionality.

Here’s a conceptual comparison of unformatted vs. formatted code, illustrating the clarity gained:

// Before automated formatting (conceptual)
const myComponent = (props) => {return (<div><p>{props.message}</p></div>);};

// After automated formatting (conceptual)
const myComponent = (props) => {
  return (
    <div>
      <p>{props.message}</p>
    </div>
  );
};

Automated tools ensure that regardless of individual developer preferences, the codebase maintains a uniform, readable structure, thereby improving collaboration and maintainability.

These refinement efforts for the AdoptaUnJuniorPlatform/GDGAranjuez project underscore that a truly high-quality application excels not just in its features, but also in its foundational user experience and developer practices.


Generated with Gitvlg.com

Boosting UX and DX: Prioritizing Accessibility and Code Standards in GDGAranjuez
G

Glòria Monzó

Author

Share: