speced / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
715 stars 384 forks source link

Common abbr lookup #686

Open marcoscaceres opened 8 years ago

marcoscaceres commented 8 years ago

it would be nice if common <abbr> were automatically titled. Like "OS", "UI", "UA", etc.

halindrome commented 8 years ago

Maybe. It would be nice if they were able to be exported into a common registry and then harvested as needed. I have the code for that for dfn / a somewhere.

sidvishnoi commented 6 years ago

Any updates on this?

marcoscaceres commented 6 years ago

What we could do is basically just pre-populate: https://github.com/w3c/respec/blob/develop/src/core/inlines.js#L27

Like:

const abbrMap = new Map([
  ["UA", "User Agent"],
  ["UI", "User Interface"],
  // and so on... 
]);
xfq commented 4 years ago

I have a list of abbreviations I often see in W3C documents, for your reference:

["AB", "Advisory Board"],
["AC", "Advisory Committee"],
["aka", "also known as"],
["API", "application programming interface"],
["ATAG", "Authoring Tool Accessibility Guidelines"],
["BCP", "Best Current Practice"],
["BG", "Business Group"],
["CDN", "content delivery network"],
["CG", "Community Group"],
["CLDR", "Common Locale Data Repository"],
["CORS", "cross-origin resource sharing"],
["CPU", "central processing unit"],
["CR", "Candidate Recommendation"],
["CSP", "Content Security Policy"],
["CSS", "Cascading Style Sheets"],
["CSSOM", "CSS Object Model"],
["DID", "Decentralized Identifiers"],
["DOM", "Document Object Model"],
["ED", "Editor's Draft"],
["EME", "Encrypted Media Extensions"],
["EOWG", "Accessibility Education and Outreach Working Group"],
["ERCIM", "European Research Consortium for Informatics and Mathematics"],
["FPWD", "First Public Working Draft"],
["GPU", "graphics processing unit"],
["HID", "Human Interface Device"],
["HTML", "HyperText Markup Language"],
["HTTP", "Hypertext Transfer Protocol"],
["IANA", "Internet Assigned Numbers Authority"],
["IDN", "internationalized domain name"],
["IETF", "Internet Engineering Task Force"],
["IG", "Interest Group"],
["IME", "Input Method Editor"],
["IRC", "Internet Relay Chat"],
["ISO", "International Organization for Standardization"],
["ISOC", "Internet Society"],
["JSON", "JavaScript Object Notation"],
["LDML", "Unicode Locale Data Markup Language"],
["LTLI", "Language Tags and Locale Identifiers for the World Wide Web"],
["MIT", "Massachusetts Institute of Technology"],
["MoU", "Memorandum of Understanding"],
["MSE", "Media Source Extensions™"],
["NDEF", "NFC Data Exchange Format"],
["NFC", "Near Field Communication"],
["OS", "operating system"],
["PING", "Privacy Interest Group"],
["PNG", "Portable Network Graphics"],
["RFC", "Request for Comments"],
["SMIL", "Synchronized Multimedia Integration Language"],
["sRGB", "standard Red Green Blue"],
["SVC", "Scalable Video Coding"],
["SVG", "Scalable Vector Graphics"],
["TAG", "Technical Architecture Group"],
["UA", "user agent"],
["UAAG", "User Agent Accessibility Guidelines"],
["UI", "user interface"],
["UUID", "universally unique identifier"],
["W3C", "World Wide Web Consortium"],
["WAI-ARIA", "Accessible Rich Internet Applications"],
["WAI", "Web Accessibility Initiative"],
["WCAG", "Web Content Accessibility Guidelines"], // IIRC it will be renamed to W3C Accessibility Guidelines in the next version
["WD", "Working Draft"],
["WG", "Working Group"],
["WHATWG", "Web Hypertext Application Technology Working Group"],
["WICG", "Web Incubator Community Group"],
["WOFF", "Web Open Font Format"],
["WoT", "Web of Things"],
["wpt", "web-platform-tests"],
["XML", "Extensible Markup Language"],
["XSS", "cross-site scripting"],
marcoscaceres commented 4 years ago

I've been thinking about this a bit more... I think what we actually want is to identify when an abbreviation is used, but it's not defined in a document (and show a warning... so this is a linter issue). There may be some common enough (e.g., "UA", "UI") that may justify baking them into ReSpec, but the rest should probably should be inlined into the specs (and ReSpec does the the right thing).