-
Notifications
You must be signed in to change notification settings - Fork 4
Divider
- Divider specification
Team Name: Astrea + Design and Web Development
Developer name: Ivan Kitanov
Designer name: Silvia Ivanova
- Damyan Petev
- Svilen Dimchevski
- Simeon Simeonov
- Radoslav Mirchev
Version | Author | Date | Notes |
---|---|---|---|
1 | Radoslav Karaivanov | 2024-06-06 | Initial draft |
2 | Radoslav Karaivanov | 2024-06-12 | Minor updates |
3 | Ivan Kitanov | 2024-06-14 | Moving inset from property to CSS variable |
4 | Ivan Kitanov | 2024-06-18 | Minor updates to the CSS variables |
5 | Radoslav Karaivanov | 2024-06-19 | Finalized specification |
The igc-divider
allows the content author to easily create a horizontal/vertical rule as a break between content to better organize information on a page.
The igc-divider
must:
- allow users to visually and semantically separate content.
- allow users to customize the orientation and rendering aspect of the divider.
- be WAI-ARIA compliant.
As an end-user I expect to be able to:
- have a clear visual separation between content on page.
As a developer I expect to be able to:
- create a break between content in a page to better organize the presented information.
- create either a horizontal or a vertical line break.
- create either a solid or a dashed line break.
- control the length of the divider line and customize it if needed.
[Design Handoff]
<p>...</p>
<igc-divider></igc-divider>
<p>...</p>
<igc-select>
<igc-select-item></igc-select-item>
<igc-select-item></igc-select-item>
...
<igc-divider></igc-divider>
<igc-select-item></igc-select-item>
...
</igc-select>
<div>
<igc-button>Save</igc-button>
<igc-divider vertical></igc-divider>
<igc-button>Cancel</igc-button>
</div>
<h1>...</h1>
<igc-divider middle inset="2rem"></igc-divider>
<section>...</section>
None applicable.
None applicable since by default the component is non-focusable.
Property | Attribute | Reflected | Property Type | Default | Description |
---|---|---|---|---|---|
middle | middle | Yes | Boolean | false | When set and inset is provided, it will shrink the divider line from both sides. |
type | type | Yes | 'solid' | 'dashed' | solid | Whether to render a solid or a dashed divider line. |
vertical | vertical | Yes | Boolean | false | Whether to render a vertical divider line. |
None applicable.
None applicable.
None applicable.
None applicable.
Name | Description |
---|---|
--inset | Shrinks the divider by the given amount from the start. If middle is set it will shrink from both sides. |
--color | Sets the color of the divider. |
- should be successfully initialized in the DOM (defined and rendered).
- should be successfully initialized with default values.
- should pass automated WAI-ARIA tests.
-
the component is non-focusable by default.
-
the component should have intrinsic default role of separator:
this._internals.role = 'separator';
-
the component should update its intrinsic aria-orientation value based on whether it is rendered horizontally or vertically:
this._internals.ariaOrientation = vertical ? 'vertical' : 'horizontal';
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-orientation
The component should work in a Right-To-Left context without additional setup or configuration.
None applicable