HTMLFieldSetElement.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/ARIA/Roles.h>
  8. #include <LibWeb/HTML/FormAssociatedElement.h>
  9. #include <LibWeb/HTML/HTMLElement.h>
  10. namespace Web::HTML {
  11. class HTMLFieldSetElement final
  12. : public HTMLElement
  13. , public FormAssociatedElement {
  14. WEB_PLATFORM_OBJECT(HTMLFieldSetElement, HTMLElement);
  15. FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLFieldSetElement)
  16. public:
  17. virtual ~HTMLFieldSetElement() override;
  18. DeprecatedString const& type() const
  19. {
  20. static DeprecatedString fieldset = "fieldset";
  21. return fieldset;
  22. }
  23. bool is_disabled() const;
  24. // ^FormAssociatedElement
  25. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  26. virtual bool is_listed() const override { return true; }
  27. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  28. virtual bool is_auto_capitalize_inheriting() const override { return true; }
  29. virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::group; }
  30. private:
  31. HTMLFieldSetElement(DOM::Document&, DOM::QualifiedName);
  32. virtual void initialize(JS::Realm&) override;
  33. };
  34. }