3.3.2.3 Use a frontend framework
A frontend framework, also known as a CSS framework, is a package consisting of pre-written, standardised code in files and folders. They give developers a base to build upon while still allowing flexibility with the final design. Essentially, a frontend framework provides a structured, reliable, and reusable template.
Benefits of a frontend framework
Efficiency: They save developers a significant amount of time by providing a foundation.
Consistency: By using the same framework, teams can maintain consistency across projects.
Responsiveness: Most frontend frameworks are built to be fully responsive right out of the box.
Community: Popular frameworks have a large community, which can offer support, additional tools and plugins to extend functionality.
Setting Up a frontend framework
Setting up a frontend framework largely involves downloading the framework's files and incorporating them into your development environment. The specific steps may vary depending on the chosen framework.
Choosing a frontend framework
Considerations for choosing a frontend framework include the framework's community support, ease of use, performance, and compatibility with your project's requirements. One crucial aspect to consider is the level of support for accessibility and right-to-left (RTL) language support.
Here's a comparison of three popular frameworks:
Framework | Accessibility | Community Support | RTL Language Support | Ease of Use/Set Up |
---|---|---|---|---|
React | Strong, with a lot of focus on making the web accessible. | Large and active community, many third-party libraries. | Native RTL support isn't included but libraries such as | Moderate, requires knowledge of JavaScript and JSX. |
Vue.js | Strong, with dedicated sections in the documentation about accessibility. | Growing rapidly, plenty of resources and libraries available. | No native RTL support, but possible with additional CSS and libraries. | High, simpler syntax and structure compared to React and Angular. |
Angular | Strong, built-in accessibility features in Angular Material. | Large and active community, backed by Google. | No native RTL support, but can be implemented with additional CSS. | Low, steep learning curve due to complexity and depth of the framework. |
Bootstrap | Good, most components are designed to be accessible. | Very large community, many templates available. | Built-in support with Bootstrap v4.0 onwards. | High, easy to integrate and get started with basic HTML and CSS. |
Chakra UI (React based) | Very strong, all components are accessible and WCAG compliant. | Growing community, becoming a go-to choice for accessible component library. | Built-in support with RTL-friendly components. | High, easy to use with good documentation but requires understanding of React. |
Use the framework as a foundation for your design system
Choose a frontend framework fitting your needs as the foundation for a reusable design system. This system, combining the framework's technical foundation with your specific visual styling and design guidelines, will ensure uniformity and accessibility across projects within your organisation. Regular updates to this living system will accommodate evolving needs and interaction patterns, solidifying an efficient and inclusive digital experience throughout government services.
\
Last updated