Skip to content

fix(tab-container): align vertical tabs with Bootstrap Italia design specs#678

Open
giulio-leone wants to merge 1 commit into
italia:mainfrom
giulio-leone:fix/568-tab-container-vertical-design
Open

fix(tab-container): align vertical tabs with Bootstrap Italia design specs#678
giulio-leone wants to merge 1 commit into
italia:mainfrom
giulio-leone:fix/568-tab-container-vertical-design

Conversation

@giulio-leone

Copy link
Copy Markdown
Contributor

Closes #568

Problem

The ItTabContainerComponent vertical mode did not match the Bootstrap Italia design specifications:

  1. Missing aria-orientation="vertical" on the <ul role="tablist"> element (a11y)
  2. Missing verticalBackground input — Bootstrap Italia supports nav-tabs-vertical-background for active tab background styling
  3. Incorrect column sizing — was tied to inverted instead of iconText, so text-only vertical tabs got wrong widths

Fix

  • Added aria-orientation="vertical" attribute when vertical=true
  • Added verticalBackground boolean input that applies nav-tabs-vertical-background class
  • Column sizing now depends on iconText:
    • Text-only vertical: col-4 col-md-3 / col-8 col-md-9 (per BI docs)
    • Icon+text vertical: col-5 col-md-4 col-lg-3 / col-7 col-md-8 col-lg-9 (per BI docs)

Tests

16 new tests covering:

  • Horizontal (no grid), vertical text-only, vertical icon+text column classes
  • verticalBackground class application
  • aria-orientation attribute presence/absence
  • Inverted vertical and inverted horizontal layouts

127/127 tests passing, 0 lint errors.

⚠️ This reopens #634 which was accidentally closed due to fork deletion.

…specs

- Add aria-orientation="vertical" to tablist when vertical=true (a11y)
- Add verticalBackground input for nav-tabs-vertical-background class
- Fix column sizing: use iconText input (not inverted) to determine
  wider columns (col-5/col-md-4/col-lg-3 vs col-4/col-md-3)
- Text-only vertical tabs use col-4/col-md-3 per BI docs
- Icon+text vertical tabs use col-5/col-md-4/col-lg-3 per BI docs
- Add 16 comprehensive tests for vertical layout, columns, background,
  aria, and inverted modes

Closes italia#568

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Il componente <it-tab-container> non rispetta le specifiche di design

1 participant