part of dart._engine;
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


/// Indicates a form.
///
/// Uses a form element to convey this semantic information to the element.
///
/// Screen-readers take advantage of "aria-label" to describe the visual.
class SemanticForm extends SemanticRole {
  SemanticForm(SemanticsObject semanticsObject)
    : super.withBasics(
        EngineSemanticsRole.form,
        semanticsObject,
        preferredLabelRepresentation: LabelRepresentation.ariaLabel,
      );

  @override
  DomElement createElement() {
    return domDocument.createElement('form');
  }

  @override
  bool focusAsRouteDefault() => focusable?.focusAsRouteDefault() ?? false;
}
