Skip to content

3.19 - Preload fonts avoid testing elements where font-family doesn't apply #7428

@DahmaniAdame

Description

@DahmaniAdame

Enhancement opportunity
We are currently checking all elements on the page for both the position and visibility.

We should limit our processing to elements that can be styled or styled by font-family. This results in 10% less elements to check on average, and up to 30% less in some cases.

User story

As product, I want to limit visibility and position checks to elements that can be styled with font-family, so that we reduce unnecessary processing and improve performance.

Acceptance Criteria

  • Elements that cannot be styled with font-family are excluded from processing
  • TAGNAMEs that do not support font-family styling are filtered out early in the logic
  • List of tags to exclude:
[
  // Metadata/document head
  'BASE', 'HEAD', 'LINK', 'META', 'STYLE', 'TITLE', 'SCRIPT'

  // Media
  'IMG', 'VIDEO', 'AUDIO', 'EMBED', 'OBJECT', 'IFRAME',

  // Templating, wrappers, components, fallback
  'NOSCRIPT', 'TEMPLATE', 'SLOT', 'CANVAS'

  // Resources
  'SOURCE', 'TRACK', 'PARAM',

  // SVG references
  'USE', 'SYMBOL', 

  // Layout work
  'BR', 'HR', 'WBR', 

  // Obsolete/deprecated
  'APPLET', 'ACRONYM', 'BGSOUND', 'BIG', 'BLINK', 'CENTER', 'FONT', 'FRAME', 'FRAMESET', 'MARQUEE', 'NOFRAMES', 'STRIKE', 'TT', 'U', 'XMP'
]

Metadata

Metadata

Labels

priority: highIssues which should be resolved as quickly as possiblequick winseverity: moderateFeature isn't working as expected but has work around to get same valuetype: enhancementImprovements that slightly enhance existing functionality and are fast to implement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions