Add tabbable input to control the diagram's Tab order - #795
Merged
Conversation
The diagram host and the watermark link were two Tab stops an application could not remove. `<ng-diagram [tabbable]="false">` takes both out of the sequential Tab order; both stay clickable, stay in the accessibility tree, and keyboard shortcuts keep working once focus is inside the diagram. Defaults to true, so current behavior is unchanged. The input lives on NgDiagramComponent rather than on the KeyboardInputsDirective host directive: api-extractor's d.ts rollup drops the host-directive reference, so a forwarded input does not compile for consumers installing from npm.
"Whether the diagram takes part in the Tab order" could read as if Tab would not enter the diagram at all. What leaves the Tab order is the container element and the watermark link; focusable content in the application's own node and edge templates keeps its own Tab stops.
lukasz-jazwa
commented
Aug 21, 2026
Jacek-Synergy
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The diagram host and the watermark link were two Tab stops an application could not remove.
<ng-diagram [tabbable]="false">takes both out of the sequential Tab order; both stay clickable, stay in the accessibility tree, and keyboard shortcuts keep working once focus is inside the diagram. Defaults to true, so current behavior is unchanged.The input lives on NgDiagramComponent rather than on the KeyboardInputsDirective host directive: api-extractor's d.ts rollup drops the host-directive reference, so a forwarded input does not compile for consumers installing from npm.
Backward compatibility
true, so applications that do not use the input keep the current behavior — the diagram container and the watermark link stay in the Tab order.tabindexattribute written on<ng-diagram>in an application template no longer takes effect. Until now the template attribute won over the directive's static hosttabindex="0", sotabindex="-1"worked as a workaround to remove the Tab stop. The attribute is now driven by a host binding, and a host binding overwrites the template attribute. Migration is one attribute: replacetabindex="-1"with[tabbable]="false"(called out in the CHANGELOG).[attr.tabindex]on<ng-diagram>was never reliable — it always fought the attribute set by the library — and still is not.tabindex(for exampletabindex="3"to give the diagram a fixed place in the page's Tab order) has no replacement:tabbableproduces only0or-1. Accepted trade-off — positive tabindex values are a WCAG anti-pattern.