New Features Described in Oracle JET's Documentation for Release 18.0.0

Here are updates to the documentation for Oracle JET to describe new features and enhancements added to Release 18.0.0.

For other changes in this release, see the product Release Notes.

Oracle JET

Documentation updates for this release of Oracle JET.

  • Oracle JET CLI migrate command

    This new command (ojet migrate) automates the migration of Oracle JET apps created using release 13.0.0 and later of Oracle JET to a later release. See Migrate an App Using the Oracle JET CLI.

  • Generate API Documentation for VComponent-based Web Components

    A new enableDocGen property in an Oracle JET app’s oraclejetconfig.json file controls whether you generate API doc for VComponent-based web components. When true, the npx ojet build component command generates API doc for the component if you previously used npx ojet add docgen to add the necessary packages and templates for API doc generation. If false, no API doc is generated. See Generate API Documentation for VComponent-based Web Components.

  • Dart Sass replaces node-sass

    Oracle JET replaced its dependency on node-sass with Dart Sass (sass) in this release. The third-party author of node-sass no longer supports it. If you continue to use Alta or a custom theme based on Alta when you migrate an app to this release, you need to install node-sass. See Migrate Alta-themed Apps to Release 18.0.0.

Migration Information

Note the following change that affect JET apps that you migrate to Release 18.0.0:

See the following sections for step-by-step information about migrating your app to this release of Oracle JET.

Oracle JET Audit Framework

Using and Extending the Oracle JET Audit Framework has been updated in the following ways.

New and changed JAF audit features:

  • Oracle JET releases supported by Oracle JAF

    Oracle JAF has discontinued audit support for Oracle JET versions lower than release 13.0.0 with the exception of 8.3.0. You can no longer specify 12.0.0, 11.0.0, and so on as values for the jetVer property in the oraclejafconfig.json file. Use the ojaf --jetlist command to retrieve the list of Oracle JET versions that you can audit with Oracle JAF. See Audit with Specific JET and ECMA Script Versions.

    A side effect of this change is that the oj-html-ojattr-520 rule has been removed from this release as it was only invoked when the jetVer property was set to 5.2. The associated message ID (JET-0040) has also been removed.

  • JAF includes changes to existing rules:

    • csp-html-unsafe-expr

      Arrow functions are now supported by the CSP expression validator and JAF no longer emits diagnostics when parsing an expression that contains the => syntax.

    • oj-css-style-override

      A JET tag selector in a CSS rule is no longer considered an override if the rule body updates only CSS variables. However, if the rule body modifies real properties, the use of a JET tag selector is still considered an override and will be flagged.

    • oj-html-prop-anti-pattern and oj-html-wctag-anti-pattern Rules

      These rules are now enabled in AMD mode.

    • jetwco-component-api-controlled-changes

      The jetwco-component-api-controlled-changes rule now has a more flexible lower bound for API changes that involve additions, such as adding a property to a component.

      Previously, the lower bound for additions followed semantic versioning rules, requiring at least a minor version change. This remains the default. However, you now have the option to allow such changes at a patch version level if needed.

      This behavior is configurable using existing rule configuration capabilities. To allow new property additions in a patch release, use the following configuration:

      "ruleMods": {
        "JETWCO": {
          "jetwco-component-api-controlled-changes": {
            "enabled": true,
            "customOpts": {
              "exchangeURL": "https://component-exchange-url/api/0.2.0",
              "controls": {
                "properties": {
                  "add": "patch"
                }
              }
            }
          }
        }
      }
  • JAF includes new rules:
    • oj-acc-aria-accessible and oj-tsx-acc-aria-accessible

      Rule: oj-acc-aria-accessible  Severity: blocker  Message ID: jet-8025
      Rule: oj-tsx-acc-aria-accessible  Severity: blocker  Message ID: jet-7265
      For components <oj-c-rating-gauge>, <oj-c-meter-bar>, or <oj-c-meter-circle> to be accessible, one
      of the following WAI-ARIA attributes:
      1) 'aria-label', 'aria-labelledby', or 'aria-describedby'
      or one of these attributes:
      2) 'labelled-by', or 'described-by'
      is required.
    • oj-html-btn-display-icon

      Severity: blocker  Message ID: jet-8020
      If a legacy <oj-button> does not specify a 'label' attribute, and its default slot is not used, it
      should specify attribute 'display="icons"'.
    • oj-html-form-layout-colspan-wrap and oj-tsx-form-layout-colspan-wrap

      Rule: oj-html-form-layout-colspan-wrap  Severity: blocker  Message ID: jet-8030
      Rule: oj-tsx-form-layout-colspan-wrap  Severity: blocker  Message ID: jet-7270
      When an <oj-form-layout> has <oj-label-value> children that specify a 'colspan' property,
      oj-form-layout's 'colspanWrap' property specifies the column spanning behavior. The 'nowrap'
      behavior has been deprecated as it is not specified by the Redwood Design System. In these cases,
      colspanWrap="wrap" needs to be specified on the <oj-form-layout> so that it will produce the
      correct layout as specified by the Redwood Design System.
    • oj-html-ojoption-text and oj-tsx-ojoption-text
      Rule: oj-html-ojoption-text  Severity: major  Message ID: jet-8005
      Rule: oj-tsx-ojoption-text  Severity: major  Message ID: jet-7255
      
      <oj-option> components cannot contain other custom elements that might render something other than
      the expected text node that is used to define the label of the option
      
    • oj-html-redwood-bp-btn-avatar and oj-tsx-redwood-bp-btn-avatar

      Rule: oj-html-redwood-bp-btn-avatar  Severity: minor  Message ID: jet-8010
      Rule: oj-tsx-redwood-bp-btn-avatar  Severity: minor  Message ID: jet-7260
      
      Buttons should not contain avatars, they may not correctly align within the button

      The redwood-strict profile has been updated for these rules with an increased severity of major (from minor) when the JAF configuration extends redwood-strict.

    • oj-html-tabbar-progressive-popup

      Severity: minor  Message ID: jet-8035
      For JET 18.0.0 and later, <oj-tab-bar> truncation="progressive" should always be used with
      overflow="popup" for handling overflow properly. If truncation="progressive" is used alone, for
      long labels it is possible that all items may not fit within oj-tab-bar despite being truncated.
    • oj-tsx-ojtag-datacmd

      Severity: major¹  Message ID's: jet-7240, 7241, 7242, 7243
      
      Attribute 'data-oj-command' should not be used on JET web component elements if the component does
      not have a list of values defined for it - refer to the JET API documentation for the component.
      
      ¹ Possibility of more than 1 severity since there are 4 message ID's
    • oj-tsx-slot-item-minmax

      Severity: minor¹  Message ID's: jet-7250, 7251
      Components can include a 'minItems' or 'maxItems' property in a slot defintion in the component
      metadata, to describe how many child elements can be assigned to that slot. This rule applies to
      components that are directly allocated to a slot, or which are direct children of a template
      allocated to that slot.
      
      ¹ Possibility of more than 1 severity since there are 2 message ID's
      

Changes for rule writers:

  • Removal of deprecated DomUtils APIs

    This release removes the getAttrIndex(), getAttrPosition(), and getAttrValuePosition() APIs that were deprecated in JAF's release 4.0.8 (February 2022). Use the replacement APIs (getAttribIndex(), getAttribPosition(), and getAttribValuePosition()) that are functionally equivalent. See DomUtils: Node Object Functions.

  • isCoreTag() deprecated

    The isCoreTag() method is deprecated and replaced by the functionally equivalent isJetCoreTag() method. Support for isCoreTag() will be removed in a future major release of JAF. See Oracle JET Audit Metadata Interface Library Tag Methods.

  • Requirement to define custom configuration properties under the customOpts rule property

    The requirement to declare any custom configuration properties that you define for your audits under the customOpts rule property in the rules.json file (described in JAF 10.0.0 / Oracle JET 17.0.0) is now treated more leniently if you audit your app in AMD or API modes. The behavior is now the following:

    • If a custom rule property is not declared under the customOpts rule property and does not have the $required property, the rule is disabled and the audit emits a warning with the JAF-2005 message ID. Unlike previously, the audit continues.
    • If a custom rule property is not declared under the customOpts rule property and does have the $required property, the associated rule pack is disabled and the audit continues.

    In CLI mode there is no change. That is, the audit emits an error with the JAF-2005 message ID and terminates.

  • Updated CSS parser now supports @container and generates an AST prelude.type property of AtrulePrelude rather than the previous value of Raw.

Documentation Accessibility

Access to Oracle Support