Convert tag names to lowercase for comparisons in JS

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | No additional failures, see note below
| Fixed tickets | #26
| License       | MIT
| Doc PR        | -

### Test results

The tests results were the same both before and after making this change:

```
Tests: 50, Assertions: 224, Failures: 1, Incomplete: 1, Skipped: 5.
```