civichackingagency / scangov

Government digital experience monitor
https://scangov.org
8 stars 2 forks source link

Absence of og:locale lowers grade but its presence is not necessary #103

Closed adriancooke closed 1 month ago

adriancooke commented 3 months ago

Describe the bug gov-metadata requires og:locale when scoring federal US sites but an og:locale value of en_US is already assumed as the protocol default.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://gov-metadata.civichackingagency.org/profile/?domain=new.nsf.gov
  2. Click on Metadata
  3. Scroll down to <meta property="og:locale">
  4. See error “Missing”

Expected behavior This metadata value should be optional for content in US English and its absence (e.g. “Not present”) should not lower the score.

Desktop (please complete the following information):

Additional context I’m not sure what the goal is here. If og:locale is documented by the protocol authors as optional metadata, where a default of en_US is assumed, what is the rationale for reducing the site’s grade if it is in fact localized to US English? Is there a consuming social application you have in mind that would require a US government site to have an explicit localization value set to work correctly? Is it comparing the lang property value of the HTML element?

If the goal is to encourage proactive inclusion of social metadata by developers, perhaps consider noting the absence of the element using a neutral indicator label but removing it from the score when it’s absence would have no negative affect on user experience. Then developers could be alerted that a possible—even anticipated—element is not present, without a claim being made that the absence caused detriment to the user. Ideally, there would also be a way to find additional technical information about why the metadata is valuable.

Refs: The Open Graph protocol A Guide to Sharing for Webmasters - Meta Metadata and tags you should include in your website - Search.gov