Is Bonferroni correction used for multiple levels, multiple factors, or both? Bonferroni correction can help us correct our alpha values in multiple statistical testing.
One aspect that I am confused on: Is Bonferroni correction used when we have multiple levels (Does this person do react better to Button Color Change: Blue, Red, or Green) or multiple factors (does this person react better to change in Button Size or Change in Layout Width)?
I'd initially think that you could use Bonferroni correction for both of these problems. But that is a naive guess.
Any guidance would be great!
 A: The purpose of multiplicity adjustments such as the Bonferroni correction is controlling the type I error rate of falsely rejecting a null hypothesis, when there are multiple null hypotheses being considered. If we look at the null hypotheses "People react the same to red buttons than to other buttons", "People react the same to blue buttons than to other buttons" and "People react the same to green buttons than to other buttons" versus the alternative hypotheses "People react better to red buttons than to other buttons", "People react better to blue buttons than to other buttons" and "People better to green buttons than to other buttons", then there is a multiplicity problem. The same is the case, if we look at "People react the same to small buttons than to bigger buttons" and "People react the same to wide buttons than to other buttons" versus the alternative hypotheses "People react better to small buttons than to other buttons", "People react better to wide buttons than to other buttons". Thus, in either case some multiplicity correction is needed, if we wish to control the familywise type I error rate across the hypotheses.
On the other hand, if we are only testing whether the colour of buttons in terms of red/green/blue matters (but we do not have a specific hypothesis about any particular colour), then only a single hypothesis is being tested, only a single type I error can be made and no correction for multiplicity is needed. However, we then have the situation that we may reject the global null hypothesis without having rejected a null hypothesis about one of the particular colours. Afterwards looking at the particular colours will still need some multiplicity adjustment. Of course, it is even worse (in terms of providing credible evidence) to fail to reject the global null and then to claim: "Ah, but red matters. Now it is clear to me that that should have been my hypothesis from the start."
Another question is whether a Bonferroni correction (just dividing the desired familwise type I error rate by the number of null hypotheses) is the most efficient. Firstly, the Bonferroni-Holm correction is always more powerful and still extremely easy to use. Secondly, the correlation in the test statistics could be exploited in the given example, but that would be more difficult to do. 
A: Bonferroni correction applies to every instance in which we test a hypothesis with a specific type I error. For instance, if we perform in a study 4 hypothesis tests on separate variables or, independently, separate levels of the same variable, then we need for penalize the significance threshold (shrink it) accordingly (i.e. 4).
Even when we perform a single test, Bonferroni correction theoretically applies (but in such a case there is no actual penalization, as indeed the significance threshold is divided by 1).
Take notice though that if we want to see whether there is an overall difference between mutually exclusive factors (even many of them, asymptotically reaching as many as you wish), then there is no need for correction (such as when conducting ANOVA). 
