Form Specification - IgniteUI/igniteui-webcomponents GitHub Wiki

Form Specification

Contents

  1. Overview
  2. User Stories
  3. Functionality
  4. Test Scenarios
  5. Accessibility
  6. Assumptions and Limitations
  7. References

Owned by

Team Name: CodeX

Developer Name: Dimitar Dimitrov

Designer Name:

Requires approval from

  • Peer Developer Name | Date:
  • Design Manager Name | Date:

Signed off by

  • Radoslav Mirchev | Date:
  • Radoslav Karaivanov | Date:

Revision History

Version Users Date Notes
1 Dimitar Dimitrov 27-Aug-2021

The <igc-form> collects data from Ignite UI Webcomponents form controls and native form controls.

Objectives

Collect data from Ignite UI Webcomponents form controls and native form controls into a single FormData object. Data is collected for the following components:

  • 'input', 'radio', 'igc-radio', 'select', 'switch', 'igc-switch', 'textarea'

Acceptance criteria

  1. The form component should have customizable content.
  2. The form component should provide a way to disable validation of child components.
  3. The form component should emit an event when it is submitted from any of the following components: 'button', 'igc-button' or 'input'

Developer stories:

  • Story 1: As a developer, I want to be able to collect data from supported controls into a single FormData object.
  • Story 2: As a developer, I want to be able to place content between the opening and closing brackets of the form component
  • Story 3: As a developer, I want to be able to disable the validation for the components, placed between the opening and closing brackets of the form component

End-user stories:

  • Story 1: As an end-user, I want to be able to submit data.

3.1. End-User Experience

3.2. Developer Experience

<igc-form novalidate>
    <label for="fname">First name:</label><br>
    <input type="text" id="fname" name="fname">
    <igc-button type="submit">Submit</igc-button>
</igc-form>

3.3. Globalization/Localization

3.4. Keyboard Navigation

Keys Description

3.5. API

IgcFormComponent

Properties

Name Description Type Default value Reflected
novalidate Specify if the form elements should not be validated when submitted. Boolean false true

Methods

Name Description Return type Parameters
submit Submits the form data. boolean (?)
reset Resets the form data.
getFormData Collects the form data and returns a single FormData object. FormData
reportValidity Returns wether the element's child controls satisfy their validation constraints. boolean

Events

Name Description Cancelable Parameters
igcSubmit Emitted when the form is submitted.
igcReset Emitted when the form is reset.

Slots

Name Description
(default) Renders the content of the form.

CSS Parts

Name Description

Automation

  • Scenario 1: ...

ARIA Support

  • <igc-form> should have role="form" if the form has an accessible name

RTL Support

Assumptions Limitation Notes
⚠️ **GitHub.com Fallback** ⚠️