twitter / opensource-website

Twitter's open source website, identifying projects we've released, organizations we support, and the work we do to support open source.
https://opensource.twitter.dev
Apache License 2.0
3.03k stars 814 forks source link

Minor Performance and Accessibility Enhancements for Twitter Open-Source Website 🌠 #181

Open sanjaiyan-dev opened 1 year ago

sanjaiyan-dev commented 1 year ago

This pull request (PR) aims to introduce a set of small but impactful improvements to enhance the performance and accessibility of the Twitter Open-Source website. These changes will make the website more inclusive, improve rendering speed, and ensure compliance with web accessibility standards. The following improvements have been implemented:

  1. Added aria-label to Hamburger Menu:

    • Added aria-label="Toggle menu" attribute to the Hamburger Menu element.
    • This addition enhances screen reader support, providing a more accessible experience for users who rely on assistive technologies.
  2. Implemented decoding="async" for Image Rendering:

    • Added decoding="async" attribute to the <img> tags.
    • This asynchronous decoding optimizes the rendering of images, resulting in improved page loading speed and a smoother user experience.
  3. Applied Defer Attribute to Scripts:

    • Converted relevant <script> tags to use the defer attribute, e.g., <script defer src=".."/>.
    • The deferred execution of scripts allows the browser to prioritize rendering the page's content first, resulting in faster initial page load times.
  4. Enhanced Accessibility by Converting Divs to Semantic Elements:

    • Identified specific HTML div elements that can be converted to semantic elements for improved accessibility.
    • Replaced appropriate divs with <section> and <article> tags, ensuring the proper structural hierarchy and enhancing screen reader navigation.
  5. Changed Input Type from Text to Search:

    • Modified relevant input fields' type attribute from text to search.
    • This update improves the accessibility of search functionality, allowing users to utilize search-specific features provided by modern browsers and assistive technologies.

These minor improvements not only contribute to the overall performance and user experience of the Twitter Open-Source website but also align with best practices for web accessibility. By addressing these areas, we can make the website more welcoming and efficient for all users.

Thank you for considering this PR.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.