Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Detect and warn if we reuse the same code for more than one rule. #133

Closed
ricksbrown opened this issue Jan 9, 2015 · 0 comments
Closed
Assignees

Comments

@ricksbrown
Copy link
Collaborator

For example if two rules try to register themselves with code: 'AX_TITLE_01' then the codebase should complain (at a glance probably belongs here: axs.AuditRules.getRule).

@ricksbrown ricksbrown self-assigned this Jan 9, 2015
ricksbrown added a commit to ricksbrown/accessibility-developer-tools that referenced this issue Jan 10, 2015
Prevent audit rules being registered with duplicate name or code.
Added new method`axs.AuditRules.addRule` to register rules instead of adding them to `axs.AuditRule.specs`.
Removed `axs.AuditRule.specs` - this breaks backwards compatibility - the extension will need to be updated.
Removed public `axs.AuditRules.rules` because:
    a) it was never used;
    b) there is a getter method to access these.
Added new method `axs.AuditRules.getRules' to replace the functionality of `axs.AuditRule.specs` and axs.AuditRules.rules.


Changed lazy instantiation of audit rules to "on demand" instantiation. This would allow for specs to be added at any time and still be picked up.


Recommend we 
Removes duplication of spec name (in the instance and on the specs object)

Fixed AX_ARIA_04
Fixed AX_TITLE_01
ricksbrown added a commit to ricksbrown/accessibility-developer-tools that referenced this issue Jan 10, 2015
Prevent audit rules being registered with duplicate name or code.
Added new method`axs.AuditRules.addRule` to register rules instead of adding them to `axs.AuditRule.specs`.
Removed `axs.AuditRule.specs` - this breaks backwards compatibility - the extension will need to be updated.
Removed public `axs.AuditRules.rules` because:
    a) it was never used;
    b) there is a getter method to access these.
Added new method `axs.AuditRules.getRules' to replace the functionality of `axs.AuditRule.specs` and axs.AuditRules.rules.

Fixed duplicate AX_ARIA_04
Fixed duplicate AX_TITLE_01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant