question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

manipulating complex objects file has too many `<dfn>`

See original GitHub issue

Describe the Issue

here is the file raw notice there are a lot of definition elements <dfn>, but there is lack of definition.

Edit: the below paragraph is wrong check bbsmooth comment below.

I think this harming accessibility, because in Mozilla docs it says that “indicate the term being defined within the context of a definition phrase or sentence”, but we aren’t defining them.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects

Your code

Sometimes you may want to store data in a flexible <dfn>Data Structure</dfn>. A JavaScript object is one way to handle flexible data. They allow for arbitrary combinations of <dfn>strings</dfn>, <dfn>numbers</dfn>, <dfn>booleans</dfn>, <dfn>arrays</dfn>, <dfn>functions</dfn>, and <dfn>objects</dfn>.

Expected behavior

Definition following the elements

Additional context

I maybe overthinking like how I usually does, but I do think it’s best to remove these elements.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
bbsmoothcommented, May 25, 2022

The use of<dfn> is required in order to meet level AAA

SC 3.1.3 does not really say this. It says that a “mechanism” should be available for identifying specific definitions of words or phrases used in an unusual or restricted way. This mechanism can be a variety of things and does not require a specific HTML element. If we really wanted to meet SC 3.1.3 then we would have to either define each of these terms in the instructions or provide a link to their definitions. But I’m not sure that they would even fall under SC 3.1.3 in the first place because it applies to words or phrases “used in an unusual or restricted way” and these are all terms commonly used in web development. I’m not saying we shouldn’t perhaps define some of these, just that SC 3.1.3 does not technically apply here.

Regardless, the <dfn> element is intended to be used when the definition is actually being given on the page, which we are not doing here, so technically it is probably not the best element to use. But as far as accessibility is concerned, it is not an issue (as I explained above).

1reaction
huyenltnguyencommented, May 25, 2022

I went through the W3C specs and I think we should keep this as-is. The use of<dfn> is required in order to meet level AAA, but:

Certain disabilities make it difficult to understand nonliteral word usage and specialized words or usage. Certain disabilities make it difficult to understand figurative language or specialized usage. Providing such mechanisms is vital for these audiences. Specialized information intended for non-specialist readers is encouraged to satisfy this Success Criterion, even when claiming only Single-A or Double-A conformance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manipulating Complex Objects, freeCodeCamp Basic Javascript
Javascript complex objects can be manipulated in different ways, in this particular lesson we have an array which contains an object inside ...
Read more >
Working with objects - JavaScript - MDN Web Docs - Mozilla
This chapter describes how to use objects, properties, and methods, and how to create your own objects. Creating new objects. You can create...
Read more >
Manipulating Complex Objects - (myMusic should have 2 ...
Your code here says get me an object called myMusic and add the property artist to it which should be set to Drake....
Read more >
Scaling and coordination deficits during dynamic object ...
The ability to reach for and dynamically manipulate objects in a dexterous ... fashion is a complex action critical to interactions with the...
Read more >
5. User-Defined Functions - Mastering Dyalog APL
After using your function for a bit you realise it is over-complicated, in the sense that it involves too many intermediate steps and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found