Home / Companies / GitHub / Blog / Post Details
Content Deep Dive

Accessibility considerations behind code search and code view

Blog post from GitHub

Post Details
Company
Date Published
Author
milemons
Word Count
2,262
Language
English
Hacker News Points
-
Summary

GitHub is committed to enhancing accessibility for developers, including those with disabilities, by reworking its code search and code view features. The project aimed to address accessibility barriers that led some developers to prefer raw code over the code view. Key areas of focus included redesigning the code search and query builder, the file tree, and keyboard navigation. The GitHub team collaborated with accessibility experts to conduct external audits, perform design reviews, and engage in office hours to address complex issues like proper filtering for code search, accessible file trees, and keyboard navigation. Challenges such as managing focus after changing sort orders and announcing search results for screen reader users were tackled by ensuring focus returned to the dropdown after page reloads and deciding to read out the header with the number of search results. The tree navigation was improved by creating an open-source TreeView that simplifies navigating through code, while keyboard navigation enhancements involved using a hidden `<textarea>` for cursor support, which aligns with a syntax-highlighted layer to aid both screen reader and keyboard users. Despite improvements, GitHub acknowledges ongoing challenges in achieving full accessibility and commits to continuous iteration and refinement of its tools to support all developers.