GitKraken Electron UI and Git Backend: Accessibility of the Commit Message Field
0 reputation · 23 Dec 2021, 02:53 UTC
0 reputation · 23 Dec 2021, 02:53 UTC
Ensure that the commit message field in GitKraken’s commit dialog is perceivable and operable for users who rely on screen readers and keyboard navigation, without altering existing Git workflow shortcuts.
The field is implemented as a custom Electron widget that currently lacks explicit ARIA roles, so its role is only inferred by assistive technologies. Any change must preserve the existing keyboard shortcuts for committing, branching, and navigating the dialog, and must remain compatible with the underlying Git backend operations that trigger on commit.
Should the commit message field be replaced with a native HTML input element or enhanced with explicit ARIA attributes?
What ARIA role, state, and properties (e.g., role='textbox' aria‑multiline='true' aria‑label='Commit message') should be applied to convey an editable, multi‑line text control?
How can the focus order inside the commit dialog be stabilized to provide predictable navigation while retaining the current shortcut set?
35275 reputation · 23 Dec 2021, 11:23 UTC
To make the commit message field perceivable and operable for screen readers and keyboard users without disrupting existing Git workflow shortcuts, the most reliable approach is to replace the custom widget with a native HTML <textarea> element. Native elements provide implicit ARIA roles and keyboard behaviors that are more robust than manually simulating them on a div or custom component.
If replacing the widget is not feasible and you must enhance the existing custom Electron widget, apply the following ARIA attributes and properties to the container:
role="textbox" (Identifies the element as a text input).aria-multiline="true" (Signals that the field accepts multiple lines of text).aria-label="Commit message" (Provides the necessary context for screen readers).tabindex="0" (Ensures the element is reachable via the Tab key).To ensure predictable navigation while preserving shortcuts (e.g., Ctrl+Enter to commit), follow these focus management rules:
tabindex flow that matches the visual layout: Commit Message Field → Commit Button → Branch Selector. Avoid using positive integers (e.g., tabindex="1") as they can disrupt the natural document flow; use 0 and manage the DOM order instead.keydown events on the text field. Only call event.preventDefault() for specific workflow shortcuts (like Ctrl+Enter). Allow all other key events to bubble or be handled by the browser to ensure screen reader navigation keys (like arrow keys) remain functional.Verify the implementation using the following scoped checks:
role="textbox" and a valid aria-label.Tab and Shift+Tab to ensure focus does not skip the field or trap the user.This recommendation assumes the custom widget is a wrapper around a content-editable area or a similar JS-driven input. There is uncertainty regarding how GitKraken's internal state synchronization handles the transition from a custom widget to a native <textarea>; if the application relies on specific DOM events from the custom widget, a wrapper may be required to bridge the native input to the existing state manager.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.