Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should apply level hierarchy #64

Open
ecureuill opened this issue Apr 9, 2020 · 13 comments
Open

Should apply level hierarchy #64

ecureuill opened this issue Apr 9, 2020 · 13 comments
Labels
🐛bug Something isn't working env:next release Something isn't working on next release module:course P2 - High Should be fixed as early as possible passed 🔵 The implementation meets the requirement role:Student user's role S2 - Minor Defects Causes the system to show incorrect, incomplete, or inconsistent results type:a11y Accessibility related functionality is broken type:usability
Milestone

Comments

@ecureuill
Copy link
Collaborator

ecureuill commented Apr 9, 2020

Expected Behavior

Programmatic heading levels should match their visual appearance (like size and boldness).

Current Behavior

Text contents of type Title, create by teacher, are not rendered using the correct heading tags. Big, Medium and Normal title are all coded as h2
image

Steps to Reproduce

  1. As a teacher, create a course with text contents
    1. Add a Title content of size Big
    2. Add a Title content of size Medium
    3. Add a Title content of size Normal
  2. As a student, navigate to the course and access it content
    1. Check the html of each of title contents

How to fix

Structure multiple headings on a page hierarchically. (best practice)
For example, try to follow nested content under an h2 heading with h3 before you use h4.
Exception: For fixed content that repeats across pages (like a footer or a sidebar), the heading level should not change.

Follow #62 and #63 specification

Related issues

#65

@ecureuill ecureuill added 🐛bug Something isn't working type:a11y Accessibility related functionality is broken role:Student user's role env:development Something isn't working on dev P3 - Normal May be fixed after the release / in the next release. This is the priority set as default. S2 - Minor Defects Causes the system to show incorrect, incomplete, or inconsistent results type:usability module:course labels Apr 9, 2020
@ecureuill ecureuill added this to the EPIC a11y Adaptable milestone Apr 9, 2020
@solex2006 solex2006 added the 2 - Ready Feature ready to implement label Apr 9, 2020
@github-actions
Copy link

github-actions bot commented Apr 9, 2020

This Feature is ready to be implemented.

@solex2006 solex2006 added 3 - Working Development in progress and removed 2 - Ready Feature ready to implement labels Apr 13, 2020
CAndresH added a commit that referenced this issue Apr 13, 2020
@solex2006 solex2006 added the need tester Ready for test label Apr 13, 2020
@CAndresH CAndresH removed the 3 - Working Development in progress label Apr 13, 2020
@github-actions
Copy link

This feature have been implemented and is ready for Funcional Test.
Please, test the feature.

@CAndresH CAndresH self-assigned this Apr 14, 2020
@ecureuill ecureuill self-assigned this Apr 16, 2020
@solex2006 solex2006 removed the need tester Ready for test label Apr 16, 2020
@juantenesaca
Copy link
Collaborator

Thank you for the information. So, we have twelve items:

image

So, could you specify which hierarchy should have each component (then no more changes will be done). And we can close intermediately this issue, due the short time for developing.

@ecureuill
Copy link
Collaborator Author

@juantenesaca it's not the case of a hierarchy for each component. The hierarchy will de determined by the presence of the BIG[MEDIUM|NORMAL title (Texto Component configured to be titles) as parent of a content.

First, lets make some definition

Target Components are the authoring tool components that are builded (html) using headers tag

<div><-- Some hypothetical component
  This component  is a TARGET COMPONENT
  Because there is one or more header tag in it -->
   <h4>
       <button>...</button>
   </h4>
   <div>
      <h5>...</h5> 
       <p>...</p>
    </div>  
</div>
<div>
  <-- Another hypothetical component
  This component is not a TARGET COMPONENT
  Because there is no header tag in it -->
  <button>...</button>
   <div>
      <p>...</p>
    </div>  
</div>

Now, rewriting the scenarios I've stated in previous commentary
When teacher add a Target Component in the work area, system must fix the headers tag

  • If teacher add a Target Component as child of a BIG Title, thus system must adjust the Target Component's headers to start in h3
    Using the above hypothetical TARGET component, the final result will be
<div>
   <h3><-- changed h4 by h3-->
       <button>...</button>
    </h4>
   <div>
      <h5>...</h5> <-- changed h5 by h4-->
      <p>...</p>
    </div>  
</div>
  • If teacher add a Target Component as child of a MEDIUM Title, thus system must adjust the Target Component's headers to start in h4
    Using the above hypothetical TARGET component, no change is necessary
<div><-- Some hypothetical component
  This component  is a TARGET COMPONENT
  Because there is one or more header tag in it -->
   <h4>
       <button>...</button>
   </h4>
   <div>
      <h5>...</h5> 
       <p>...</p>
    </div>  
</div>
  • If teacher add a Target Component as child of a NORMAL Title, thus system must adjust the Target Component's headers to start in h5
    Using the above hypothetical TARGET component, the final result will be
<div>
   <h5><-- changed h4 by h5-->
       <button>...</button>
    </h5>
   <div>
      <h6>...</h6> <-- changed h5 by h6-->
      <p>...</p>
    </div>  
</div>
  • If teacher add a Target Component as NOT a child of any Title, thus system must adjust the Target Component's headers to start in h2
    Using the above hypothetical TARGET component, the final result will be
<div>
   <h2><-- changed h4 by h2-->
       <button>...</button>
    </h2>
   <div>
      <h3>...</h3> <-- changed h5 by h3-->
      <p>...</p>
    </div>  
</div>
  • So, you need to create an algorithm that will validate the Title hierarchy ( h2 > h3 > h4 > h5 > h6) of the contents added to the work area. This algorithm will just run for TARGET COMPONENTS.
  • You need to determine which authoring tools are target components by looking for headers
    in theirs code
  • As I said in the previous commentary, this i not an exhaustive list of scenarios. I listed the scenarios triggered by the "adding a target component in work area", but the validation need to considere other triggers event, like:
    • Create a BIG | MEDIUM | NORMAL Title as a parent of components already added in work area
    • Move a BIG | MEDIUM | NORMAL Title in work area
    • Delete a BIG | MEDIUM | NORMAL Title from work area
    • Move a target component

Example of adding a hypothetical target component in work area, with no title as parent

image

Example of adding a hypothetical target component in work area with a BIG TITLE as parent

image

Example of adding a hypothetical target component in work area with a MEDIUM TITLE as parent

image

Example of adding a hypothetical target component in work area with a NORMAL TITLE as parent

image

Example of MOVING a Title that will cause the need to adust header of an existent Target Content

  • Inital state
    image
  • moving Title
    image
  • final state
    image

Example of DELETING a Title that will cause the need to adust header of an existent Target Content

  • Inital state
    image
  • Deleting
    image
  • final state
    image

@juantenesaca
Copy link
Collaborator

I see. For it then, we need to first implement code to detect children and parents, in order to configure on which hierarchy they have to start.

@gavixo we need to implement more code for this requirement. What do you think?

@ecureuill
Copy link
Collaborator Author

@juantenesaca @gavixo have a look in branch feature/64

I've done a header validation for my text Editor (a11yEditor) component that find the headers with wrong level and adjust existent headers new headers are added or when a existent header is deleted or had level changed.

I commited a simple version of that algorithm with a Demo component for test purpose

image


What you think I create a new feature about the headers validation, because this is bigger scope then this bug ?

And for this bug issue you just need to correct the header tags for:
Big Title -- h2
Medium -- h3
Normal -- h4

Note: I'm suggesting start in h2 supposing that only h1 will be reserved fot the Topic/Unit page in Student View. You need to heck this with Instructional Developer

@ecureuill ecureuill added the 0 - Backlog Feature that is not planned for a specific release label May 22, 2020
@github-actions
Copy link

github-actions bot commented May 22, 2020

This Feature Request was accepted, but are not going to be implemented in next release.


This will be work on #60 release

@ecureuill ecureuill added 2 - Ready Feature ready to implement and removed 0 - Backlog Feature that is not planned for a specific release labels Jun 20, 2020
@github-actions
Copy link

This Feature is ready to be implemented.

@ecureuill ecureuill removed the 2 - Ready Feature ready to implement label Jun 20, 2020
@ecureuill ecureuill added env:next release Something isn't working on next release and removed env:development Something isn't working on dev failed 🔴 The implementation doesn't meet the requirement labels Aug 23, 2020
@ecureuill
Copy link
Collaborator Author

@juantenesaca, as I commented before, it's necessary a header validation and that the headers used in components be settled dynamically in Course's Page take in account the Title structured created by teacher.

💡 My suggestion for now is that you can avoid a lot of work by removing unnecessarily headers from components

  • Activity and Quiz: is coded using accordion (hilde/show panel) and for that header is required, thus I suggest that you render the activity and quiz without accordion

  • Audio, Image and Video: follow their respective specifications in Instructional Design milestone that you will avoid the use of unnecessarily headers

Let's talk better when you start this.

@CAndresH CAndresH removed their assignment Sep 8, 2020
@ecureuill ecureuill removed their assignment Sep 9, 2020
@ecureuill ecureuill added P2 - High Should be fixed as early as possible and removed P3 - Normal May be fixed after the release / in the next release. This is the priority set as default. labels Sep 9, 2020
@solex2006 solex2006 added the passed 🔵 The implementation meets the requirement label Oct 8, 2020
@github-actions
Copy link

github-actions bot commented Oct 8, 2020

Functional Test passed!
Please, make a PULL REQUEST or, if already merged, close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working env:next release Something isn't working on next release module:course P2 - High Should be fixed as early as possible passed 🔵 The implementation meets the requirement role:Student user's role S2 - Minor Defects Causes the system to show incorrect, incomplete, or inconsistent results type:a11y Accessibility related functionality is broken type:usability
Projects
None yet
Development

No branches or pull requests

4 participants